nparashuram / cordova-plugin-browsersync

BrowserSync Plugin for Cordova
110 stars 69 forks source link

npm version conflict #28

Open miguelrincon opened 7 years ago

miguelrincon commented 7 years ago

When running cordova prepare I run into the following issue.

I think is due to a different npm version being included along with this project. I really like this plugin but this prevents me from running cordova normally.

Should npm dependency be remove from this plugin?

$ npm run cordova -- prepare

> myservice-ng@1.3.76 cordova /Users/mr155795/git/myservice2-ng
> cordova "prepare"

Discovered platform "android@^6.2.3" in config.xml or package.json. Adding it to the project
Error: Cannot find module 'npm'
Discovered platform "browser@^4.1.0" in config.xml or package.json. Adding it to the project
Error: Cannot find module 'npm'
Discovered platform "ios@^4.4.0" in config.xml or package.json. Adding it to the project
Error: Cannot find module 'npm'
Error: No platforms added to this project. Please use `cordova platform add <platform>`.

npm ERR! Darwin 16.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "cordova" "--" "prepare"
npm ERR! node v6.9.4
npm ERR! npm  v4.1.1
npm ERR! code ELIFECYCLE
npm ERR! project@1.3.76 cordova: `cordova "prepare"`
npm ERR! Exit status 1
yipcma commented 7 years ago

same issue