E
E
Evgeny Kalibrov2014-12-01 09:57:31
Node.js
Evgeny Kalibrov, 2014-12-01 09:57:31

How to install phonegap from npm?

Good afternoon!
I'm trying to install phonegap on a windows machine. During installation, the following error occurs:

C:\Users\TRUEValentine>npm install -g phonegap
npm WARN deprecated [email protected]: module has been merged into crc3
2-stream
|


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

|


> [email protected] install C:\Users\TRUEValentine\AppData\Roaming\npm\node_modules\phon
egap\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> builderror.log) || (exit 0)

npm ERR! [email protected] install: `(node-gyp rebuild 2> builderror.log) || (exit 0)`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the ws package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     (node-gyp rebuild 2> builderror.log) || (exit 0)
npm ERR! You can get their info via:
npm ERR!     npm owner ls ws
npm ERR! There is likely additional logging output above.

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "phonegap"
npm ERR! cwd C:\Users\TRUEValentine
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! syscall spawn
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! not ok code 0

How to overcome it? What is interesting on one machine was installed without problems, and not the second in any way, because of this error during installation.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Timur Shemsedinov, 2014-12-01
@MarcusAurelius

In the same place, a bunch of everything from the source codes should be compiled, for this you need a whole load of everything. Is Python worth it? Node-gyp worth it? MS Visual Studio? Are the paths to all this in PATH? I also advise you to check the rights to the folders and try to run the console from under the admin and install from there. A similar situation is being considered here: https://github.com/TooTallNate/node-gyp/issues/277 Well, I am sending you how the output to the console should look like with a successful build, from this you can learn this
: the first of the dependencies to be compiled, the ws module, namely bufferutil.cc, perhaps npm is not looking for it there or does not have sufficient rights to access it or the compiler
2. There may be additional problems with geoip-lite, as during installation, it downloads a lot from the Internet and converts databases, try installing it separately npm install geoip-lite and see what the output is.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question