Answer the question
In order to leave comments, you need to log in
Error while installing Nodejs module?
When trying to install the mmmagic module via npm, an error is returned:
C:\Users\Леонид>npm install mmmagic
npm http GET https://registry.npmjs.org/mmmagic
npm http 304 https://registry.npmjs.org/mmmagic
> [email protected] install C:\Users\Леонид\node_modules\mmmagic
> node-gyp rebuild
C:\Users\Леонид\node_modules\mmmagic>node "C:\Program Files\nodejs\node_modules\
npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYT
HON env variable.
gyp ERR! stack at failNoPython (C:\Program Files\nodejs\node_modules\npm\nod
e_modules\node-gyp\lib\configure.js:103:14)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node
-gyp\lib\configure.js:64:11
gyp ERR! stack at Object.oncomplete (fs.js:107:15)
gyp ERR! System Windows_NT 6.2.9200
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modu
les\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Леонид\node_modules\mmmagic
gyp ERR! node -v v0.10.28
gyp ERR! node-gyp -v v0.13.0
gyp ERR! not ok
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the mmmagic package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls mmmagic
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.2.9200
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "mmmagic"
npm ERR! cwd C:\Users\Леонид
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.9
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Users\Леонид\npm-debug.log
npm ERR! not ok code 0
C:\Users\Леонид>npm install -msvs_version=2012
npm ERR! install Couldn't read dependencies
npm ERR! package.json ENOENT, open 'C:\Users\Леонид\package.json'
npm ERR! package.json This is most likely not a problem with npm itself.
npm ERR! package.json npm can't find a package.json file in your current directo
ry.
npm ERR! System Windows_NT 6.2.9200
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-msvs_version=2012"
npm ERR! cwd C:\Users\Леонид
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.9
npm ERR! path C:\Users\Леонид\package.json
npm ERR! code ENOPACKAGEJSON
npm ERR! errno 34
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Users\Леонид\npm-debug.log
npm ERR! not ok code 0
Answer the question
In order to leave comments, you need to log in
1) We put a python and ONLY the second version. The third one is not supported.
2) Let's try again.
3) If it didn't work out, manually specify the path to the python via npm config set python /path/to/python.
For even more confidence, install node-gyp via npm -g install node-gyp and do node-gyp rebuild.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question