2015-10-13 7 views
2

Я использую Windows, 10 X64, Python 2.7.10 и 4.2.0 node.jssocket.io Установка ошибок Windows 10

Когда я пытаюсь установить socket.io получает этой ошибки:

C:\WINDOWS\system32>npm install socket.io 

> [email protected] install C:\WINDOWS\system32\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\bufferutil 
> node-gyp rebuild 


C:\WINDOWS\system32\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\bufferutil>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild) else (node rebuild) 
gyp: binding.gyp not found (cwd: C:\WINDOWS\system32\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\bufferutil) while trying to load binding.gyp 
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1 
gyp ERR! stack  at ChildProcess.onCpExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:355:16) 
gyp ERR! stack  at emitTwo (events.js:87:13) 
gyp ERR! stack  at ChildProcess.emit (events.js:172:7) 
gyp ERR! stack  at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12) 
gyp ERR! System Windows_NT 10.0.10240 
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" 
gyp ERR! cwd C:\WINDOWS\system32\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\bufferutil 
gyp ERR! node -v v4.2.0 
gyp ERR! node-gyp -v v3.0.3 
gyp ERR! not ok 

> [email protected] install C:\WINDOWS\system32\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\utf-8-validate 
> node-gyp rebuild 


C:\WINDOWS\system32\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\utf-8-validate>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild) else (node rebuild) 
gyp: binding.gyp not found (cwd: C:\WINDOWS\system32\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\utf-8-validate) while trying to load binding.gyp 
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1 
gyp ERR! stack  at ChildProcess.onCpExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:355:16) 
gyp ERR! stack  at emitTwo (events.js:87:13) 
gyp ERR! stack  at ChildProcess.emit (events.js:172:7) 
gyp ERR! stack  at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12) 
gyp ERR! System Windows_NT 10.0.10240 
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" 
gyp ERR! cwd C:\WINDOWS\system32\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\utf-8-validate 
gyp ERR! node -v v4.2.0 
gyp ERR! node-gyp -v v3.0.3 
gyp ERR! not ok 
npm WARN optional dep failed, continuing [email protected] 
npm WARN optional dep failed, continuing [email protected] 

> [email protected] install C:\WINDOWS\system32\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\node_modules\bufferutil 
> node-gyp rebuild 

/
C:\WINDOWS\system32\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\node_modules\bufferutil>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild) else (node rebuild) 
gyp: binding.gyp not found (cwd: C:\WINDOWS\system32\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\node_modules\bufferutil) while trying to load binding.gyp 
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1 
gyp ERR! stack  at ChildProcess.onCpExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:355:16) 
gyp ERR! stack  at emitTwo (events.js:87:13) 
gyp ERR! stack  at ChildProcess.emit (events.js:172:7) 
gyp ERR! stack  at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12) 
gyp ERR! System Windows_NT 10.0.10240 
command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" 
gyp ERR! cwd C:\WINDOWS\system32\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\node_modules\bufferutil 
gyp ERR! node -v v4.2.0 
gyp ERR! node-gyp -v v3.0.3 
gyp ERR! not ok 

> [email protected] install C:\WINDOWS\system32\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\node_modules\utf-8-validate 
> node-gyp rebuild 


C:\WINDOWS\system32\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\node_modules\utf-8-validate>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild) else (node rebuild) 
gyp: binding.gyp not found (cwd: C:\WINDOWS\system32\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\node_modules\utf-8-validate) while trying to load binding.gyp 
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1 
gyp ERR! stack  at ChildProcess.onCpExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:355:16) 
gyp ERR! stack  at emitTwo (events.js:87:13) 
gyp ERR! stack  at ChildProcess.emit (events.js:172:7) 
gyp ERR! stack  at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12) 
gyp ERR! System Windows_NT 10.0.10240 
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" 
gyp ERR! cwd C:\WINDOWS\system32\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\node_modules\utf-8-validate 
gyp ERR! node -v v4.2.0 
gyp ERR! node-gyp -v v3.0.3 
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], [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], [email protected], [email protected], [email protected], [email protected]) 

ответ

0

У меня есть окна 10 x64. Я установил python 2.7.3 и добавил к своему пути, как указано в nodegyp. Я установил сообщество visual studio 2013. , а также установили node-gyp. все еще я получал ошибку при установке socket.io или других собственных модулей, таких как bcrypt.

Затем я попытался установить Socket.io с помощью следующей команды

npm install --save socket.io --msvs_version=2013 

Это решило проблему и установили Socket.io без каких-либо ошибок. Хитрость

npm install <package name> --msvs_version=2013 
Смежные вопросы