10
When I try to install the modules I need it returns me several errors at the time of installation (in this case I tried to install the socket.io):
Microsoft Windows [versão 6.3.9600]
(c) 2013 Microsoft Corporation. Todos os direitos reservados.
C:\Users\Ivan Silva>npm install socket.io
\
> [email protected] install C:\Users\Ivan Silva\node_modules\socket.io\node_m
odules\engine.io\node_modules\ws\node_modules\utf-8-validate
> node-gyp rebuild
C:\Users\Ivan Silva\node_modules\socket.io\node_modules\engine.io\node_modules\w
s\node_modules\utf-8-validate>if not defined npm_config_node_gyp (node "C:\nodej
s\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js
" rebuild ) else (node 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:\nodejs\node_modules\npm\node_modules\node
-gyp\lib\configure.js:114:14)
gyp ERR! stack at C:\nodejs\node_modules\npm\node_modules\node-gyp\lib\confi
gure.js:69:11
gyp ERR! stack at FSReqWrap.oncomplete (evalmachine.<anonymous>:95:15)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "node" "C:\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\
bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Ivan Silva\node_modules\socket.io\node_modules\engine.io\n
ode_modules\ws\node_modules\utf-8-validate
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
> [email protected] install C:\Users\Ivan Silva\node_modules\socket.io\node_modul
es\engine.io\node_modules\ws\node_modules\bufferutil
> node-gyp rebuild
C:\Users\Ivan Silva\node_modules\socket.io\node_modules\engine.io\node_modules\w
s\node_modules\bufferutil>if not defined npm_config_node_gyp (node "C:\nodejs\no
de_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" re
build ) else (node 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:\nodejs\node_modules\npm\node_modules\node
-gyp\lib\configure.js:114:14)
gyp ERR! stack at C:\nodejs\node_modules\npm\node_modules\node-gyp\lib\confi
gure.js:69:11
gyp ERR! stack at FSReqWrap.oncomplete (evalmachine.<anonymous>:95:15)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "node" "C:\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\
bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Ivan Silva\node_modules\socket.io\node_modules\engine.io\n
ode_modules\ws\node_modules\bufferutil
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
npm WARN optional dep failed, continuing [email protected]
> [email protected] install C:\Users\Ivan Silva\node_modules\socket.io\node_m
odules\socket.io-client\node_modules\engine.io-client\node_modules\ws\node_modul
es\utf-8-validate
> node-gyp rebuild
C:\Users\Ivan Silva\node_modules\socket.io\node_modules\socket.io-client\node_mo
dules\engine.io-client\node_modules\ws\node_modules\utf-8-validate>if not define
d npm_config_node_gyp (node "C:\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\
node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node 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:\nodejs\node_modules\npm\node_modules\node
-gyp\lib\configure.js:114:14)
gyp ERR! stack at C:\nodejs\node_modules\npm\node_modules\node-gyp\lib\confi
gure.js:69:11
gyp ERR! stack at FSReqWrap.oncomplete (evalmachine.<anonymous>:95:15)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "node" "C:\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\
bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Ivan Silva\node_modules\socket.io\node_modules\socket.io-c
lient\node_modules\engine.io-client\node_modules\ws\node_modules\utf-8-validate
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
npm WARN optional dep failed, continuing [email protected]
> [email protected] install C:\Users\Ivan Silva\node_modules\socket.io\node_modul
es\socket.io-client\node_modules\engine.io-client\node_modules\ws\node_modules\b
ufferutil
> node-gyp rebuild
C:\Users\Ivan Silva\node_modules\socket.io\node_modules\socket.io-client\node_mo
dules\engine.io-client\node_modules\ws\node_modules\bufferutil>if not defined np
m_config_node_gyp (node "C:\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node
_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node 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:\nodejs\node_modules\npm\node_modules\node
-gyp\lib\configure.js:114:14)
gyp ERR! stack at C:\nodejs\node_modules\npm\node_modules\node-gyp\lib\confi
gure.js:69:11
gyp ERR! stack at FSReqWrap.oncomplete (evalmachine.<anonymous>:95:15)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "node" "C:\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\
bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Ivan Silva\node_modules\socket.io\node_modules\socket.io-c
lient\node_modules\engine.io-client\node_modules\ws\node_modules\bufferutil
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
npm WARN optional dep failed, continuing [email protected]
npm WARN optional dep failed, continuing [email protected]
[email protected] node_modules\socket.io
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected], [email protected],
[email protected], [email protected])
├── [email protected] ([email protected], [email protected], socket.io-parser@2.
2.2)
├── [email protected] ([email protected], [email protected], [email protected], [email protected]
.0)
└── [email protected] ([email protected], [email protected], [email protected], backo2@1
.0.2, [email protected], [email protected], [email protected], has
[email protected], [email protected], [email protected])
C:\Users\Ivan Silva>
See the Proxy settings
– DiegoAugusto
Could you post the rest of the log? Just that part doesn’t help much in identifying the error. I even have an idea of what it might be, but I need to be sure of the mistake.
– Zignd
I’ll do that.
– Mike
Error: Can’t find Python Executable "python", you can set the PYT HON env variable
– bfavaretto
Sorry, I didn’t know =)
– Mike
Python is missing from my machine is this?
– Mike
Related: https://github.com/nodejs/node-gyp/issues/629
– Sergio
Personal opinion: When I need to install packages with many dependencies I use the Chocolatey, it will take care of checking and installing the dependencies.
– Pedro Camara Junior
I guess that’s right.
– bfavaretto
after installing install windows build tools, arrow the npm version "npm config set msvs_version 2017" here saved me. Another option is to install windwosbuildtool to remove python and install via Scoop (Scoop install python27)
– fabiovaz