0

Got python version 3.5.0 installed (Thanks to Hiren S.) for saying I didn't have it installed. Now I am getting this error when I try to install ws (web socket.) Still have no idea what error I am getting or what it means.

C:\Documents and Settings\Grimm>npm install python
[email protected] node_modules\python
C:\Documents and Settings\Grimm>npm install ws
-
> [email protected] install C:\Documents and Settings\Grimm\node_modules\ws\node_m
odules\bufferutil
> node-gyp rebuild
C:\Documents and Settings\Grimm\node_modules\ws\node_modules\bufferutil>if not de
fined npm_config_node_gyp (node "E:\Agar\Ogar-master\src\nodejs\node_modules\npm
\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else
(node rebuild )
gyp ERR! UNCAUGHT EXCEPTION
gyp ERR! stack Error: spawn UNKNOWN
gyp ERR! stack at exports._errnoException (util.js:837:11)
gyp ERR! stack at ChildProcess.spawn (internal/child_process.js:298:11)
gyp ERR! stack at exports.spawn (child_process.js:339:9)
gyp ERR! stack at exports.execFile (child_process.js:141:15)
gyp ERR! stack at checkPythonVersion (E:\Agar\Ogar-master\src\nodejs\node_mo
dules\npm\node_modules\node-gyp\lib\configure.js:86:5)
gyp ERR! stack at E:\Agar\Ogar-master\src\nodejs\node_modules\npm\node_modul
es\node-gyp\lib\configure.js:53:9
gyp ERR! stack at E:\Agar\Ogar-master\src\nodejs\node_modules\npm\node_modul
es\which\which.js:82:18
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:82:15)
gyp ERR! System Windows_NT 5.1.2600
gyp ERR! command "E:\\Agar\\Ogar-master\\src\\nodejs\\node.exe" "E:\\Agar\\Ogar-
master\\src\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js
" "rebuild"
gyp ERR! cwd C:\Documents and Settings\Grimm\node_modules\ws\node_modules\bufferu
til
gyp ERR! node -v v4.1.1
gyp ERR! node-gyp -v v3.0.3
gyp ERR! This is a bug in `node-gyp`.
gyp ERR! Try to update node-gyp and file an Issue if it does not help:
gyp ERR! <https://github.com/nodejs/node-gyp/issues>
> [email protected] install C:\Documents and Settings\Grimm\node_modules\ws\no
de_modules\utf-8-validate
> node-gyp rebuild
C:\Documents and Settings\Grimm\node_modules\ws\node_modules\utf-8-validate>if no
t defined npm_config_node_gyp (node "E:\Agar\Ogar-master\src\nodejs\node_modules
\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) e
lse (node rebuild )
gyp ERR! UNCAUGHT EXCEPTION
gyp ERR! stack Error: spawn UNKNOWN
gyp ERR! stack at exports._errnoException (util.js:837:11)
gyp ERR! stack at ChildProcess.spawn (internal/child_process.js:298:11)
gyp ERR! stack at exports.spawn (child_process.js:339:9)
gyp ERR! stack at exports.execFile (child_process.js:141:15)
gyp ERR! stack at checkPythonVersion (E:\Agar\Ogar-master\src\nodejs\node_mo
dules\npm\node_modules\node-gyp\lib\configure.js:86:5)
gyp ERR! stack at E:\Agar\Ogar-master\src\nodejs\node_modules\npm\node_modul
es\node-gyp\lib\configure.js:53:9
gyp ERR! stack at E:\Agar\Ogar-master\src\nodejs\node_modules\npm\node_modul
es\which\which.js:82:18
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:82:15)
gyp ERR! System Windows_NT 5.1.2600
gyp ERR! command "E:\\Agar\\Ogar-master\\src\\nodejs\\node.exe" "E:\\Agar\\Ogar-
master\\src\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js
" "rebuild"
gyp ERR! cwd C:\Documents and Settings\Grimm\node_modules\ws\node_modules\utf-8-v
alidate
gyp ERR! node -v v4.1.1
gyp ERR! node-gyp -v v3.0.3
gyp ERR! This is a bug in `node-gyp`.
gyp ERR! Try to update node-gyp and file an Issue if it does not help:
gyp ERR! <https://github.com/nodejs/node-gyp/issues>
npm WARN optional dep failed, continuing [email protected]
npm WARN optional dep failed, continuing [email protected]
[email protected] node_modules\ws
├── [email protected]
└── [email protected]
C:\Documents and Settings\Grimm>

2 Answers 2

1

Python version 2.7 works with Node js (not version 3.x.x). Try to install instead this version : 2.7.11. Then check your path of Python : C:\Python27\ and C:\Python27\Scripts

Then in your command as administrator, run npm install --global --production windows-build-tools

answered Nov 9, 2017 at 18:37
Sign up to request clarification or add additional context in comments.

Comments

0

You did not installed Python or PYTHON environment variable is not set.

you have to download python from here : https://www.python.org/downloads/

answered Sep 26, 2015 at 7:04

1 Comment

Alright I installed Python and now I am getting a different error. Will update my post now.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.