Installing plugins keeps crashing due to es6-prepare-plugin
I am trying to provision an iOS app and I need to get the socialsharing and whitelist plugin but they don't work. For example, when I do this:
sudo cordova plugin add cordova-plugin-x-socialsharing
I get this:
Installing "cordova-plugin-x-socialsharing" for android
Failed to install 'cordova-plugin-x-socialsharing': CordovaError:
Failed to load plugin es6-prom-plugin via registry. It is likely either a connection issue or the plugin specification is incorrect. Check your connection and plugin name / version / url. Error: npm: command failed with exit code 1 Output error: npm ERR! ENOLOCAL code npm ERR! Failed to install from "node_modules / es6-prom-plugin" as it does not contain package.json file.
npm ERR!
How can I fix this? I've tried everything. From sudo commands to non-sudo, but nothing works for me. Adding es6-prepare-plugin manually doesn't work either.
My system information:
Cordova CLI: 7.0.1
Gulp version: CLI version 3.9.1
Gulp local: Local version 3.9.1
Ionic Framework Version: 1.3.3
Ionic CLI Version: 2.1.0
Ionic App Lib Version: 2.1.0-beta.1
ios-deploy version: 1.9.0
ios-sim version: 5.0.8
OS: Mac OS X El Capitan
Node Version: v6.8.1
Xcode version: Xcode 8.3.3 Build version 8E3004b
PS: in my package.json file I see this:
"es6-promise-plugin": "file:node_modules/es6-promise-plugin",
How can I change this?
source to share
My God, Lord. I found the answer I was looking for after struggling for hours. This Github link is the answer to this problem.
It seems that npm
version 5.xx doesn't work with some ionic plugins. I downgraded to npm 4 using npm install -g npm@4.6.1
and after that installing this plugin worked for me.
Ionic is sometimes so buggy. Very annoying.
source to share