i have recently started using ionic. I m trying to use native plugins such as in-app-browser, camera etc. However when i try to install them using the below command(as mentioned in ionic documentation):
ionic cordova plugin add cordova-plugin-inappbrowser
It throws me the following error:
F:\IonicProjects\demoBlank>ionic cordova plugin add cordova-plugin-inappbrowser
? The plugin @ionic/cli-plugin-cordova is not installed. Would you like to inst
all it and continue? Yes
npm install --save-dev --save-exact @ionic/cli-plugin-cordova@latest
√ Running command - done!
cordova plugin add cordova-plugin-inappbrowser --save
× Running command - failed!
[ERROR] Cordova encountered an error.
You may get more insight by running the Cordova command above directly.
[ERROR] An error occurred while running cordova plugin add
cordova-plugin-inappbrowser --save (exit code 1):
Error: Failed to fetch plugin email@example.com via registry. Probably this is either a connection problem, or plugin spec is incorrect. Check your connection and plugin name/version/URL. Error: cmd: Command failed with exit code ENOENT
the same error is coming while installing other cordova-plugins such as camera.
my ionic info is:
cli packages: (F:\IonicProjects\demoBlank\node_modules)
@ionic/cli-plugin-cordova : 1.6.2 @ionic/cli-plugin-ionic-angular : 1.4.1 @ionic/cli-utils : 1.7.0 ionic (Ionic CLI) : 3.7.0
Cordova CLI : 7.0.1
@ionic/app-scripts : 2.1.3 Cordova Platforms : none Ionic Framework : ionic-angular 3.6.0
Node : v6.11.2 OS : Windows 10 npm : 3.10.10
while setting the development environment i hadn’t add platforms to my projects, is it neccessary to add platforms before installing cordova plugins.
also my network connectoion seems to have no problem as all others npm modules have been installed properly.
please help me on this as i m stuck on it.
Thanks in advance