Error installing phonegap by npm

Asked

Viewed 255 times

3

This is the problem that has occurred, I tried to install Gyp and did not solve, someone would explain me what is happening please.

[email protected] install C:\Users\Laris\AppData\Roaming\npm\node_modules\phonegap\node_modules\connect-phonegap\node_modules\socket.io\node_modules\engine.io\node_modules\ws
(node-gyp rebuild 2> builderrror.log) || (exit 0)


C:\Users\Laris\AppData\Roaming\npm\node_modules\phonegap\node_modules\connect-phonegap\node_modules\socket.io\node_modules\engine.io\node_modules\ws>if not defined npm_config_node_gup (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js rebuild) else (node rebuild)

[email protected] install C:\Users\Laris\AppData\Roaming\npm\node_modules\phonegap\node_modules\connect-phonegap\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws
(node-gyp rebuild 2> builderrror.log) || (exit 0)

C:\Users\Laris\AppData\Roaming\npm\node_modules\phonegap\node_modules\connect-phonegap\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine-io-cliente\node_modules\ws>if not defined npm_config_node_gup (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js rebuild) else (node rebuild)

C:\Users\Laris\AppData\Roaming\npm\phonegap -> C:\Users\Laris\AppData\Roaming\npm\node_modules\phonegap\bin\phonegap.js

inserir a descrição da imagem aqui

Node.js version 0.10 error:

npm ERR! fetch failed https://registry.npmjs.org/lodash/-/lodash-1.0.2.tgz

[email protected] install C:\Users\Laris\AppData\Roaming\npm\node_modules\phonegap\node_modules\connect-phonegap\node_modules\socket.io\node_modules\engine.io\node_modules\ws
(node-gyp rebuild 2> builderrror.log) || (exit 0)


C:\Users\Laris\AppData\Roaming\npm\node_modules\phonegap\node_modules\connect-phonegap\node_modules\socket.io\node_modules\engine.io\node_modules\ws>if not defined npm_config_node_gup (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js rebuild) else (node rebuild)

[email protected] install C:\Users\Laris\AppData\Roaming\npm\node_modules\phonegap\node_modules\connect-phonegap\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws
(node-gyp rebuild 2> builderrror.log) || (exit 0)

C:\Users\Laris\AppData\Roaming\npm\node_modules\phonegap\node_modules\connect-phonegap\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine-io-cliente\node_modules\ws>if not defined npm_config_node_gup (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js rebuild) 

npm ERR! Error: EBUSY, open 'C:\Users\Laris\AppData\Roaming\npm\node_modules\phonegap\node_modules\phonegap-build\packge.json
npm ERR! If you need help, you may report this "entire" log,
npm ERR! including the npm and node versions, at
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Windows_NT 6.2.9200
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js "install" "-g" "phonegap"
npm ERR! cwd C:\
npm ERR! node -v v0.10.36
npm ERR! npm -v 1.4.28
npm ERR! path C:\Users\Laris\AppData\Roaming\npm\node_modules\phonegap\node_modules\phonegap-build\package.json
npm ERR! code EBUSY
npm ERR! errno 10
npm ERR! no ok code 0
  • Paste in your question the error text that is easier to view.

  • I edited it. Written error.

  • @Larissamourullo, nodejs v4 is very recent, it may be that Cordova or Phonegap have not yet adjusted their dependency to this version. Try to uninstall the current version and install version 0.8 or 0.10. Then tell us what happened.

  • The error in installing phonegap got worse with version 0.10. I will put the error below the old image.

  • I tried to use version 0.8 more ai until Cordova does not install, giving millions of errors and stating that it needs to be a version higher than 0.9.

1 answer

2


Try this:

sudo npm cache clean -f
sudo npm install -g n
sudo n stable

Browser other questions tagged

You are not signed in. Login or sign up in order to post.