2013-03-19 3 views
1

안녕하세요, 친구을 사용하여 을 (를) 사용하여 socket.io 모듈을 설치하려고합니다. 작동하지 않는 오류가 발생했습니다 :Socket.io 패키지가 윈도우 7에 설치되지 않았습니다. Node.js

npm WARN package.json [email protected] No README.md file found! 
npm http GET https://registry.npmjs.org/socket.io 
npm http 200 https://registry.npmjs.org/socket.io 
npm http GET https://registry.npmjs.org/socket.io-client/0.9.11 
npm http GET https://registry.npmjs.org/policyfile/0.0.4 
npm http GET https://registry.npmjs.org/base64id/0.1.0 
npm http GET https://registry.npmjs.org/redis/0.7.3 
npm http 304 https://registry.npmjs.org/socket.io-client/0.9.11 
npm http 304 https://registry.npmjs.org/policyfile/0.0.4 
npm http 304 https://registry.npmjs.org/redis/0.7.3 
npm http 304 https://registry.npmjs.org/base64id/0.1.0 
npm http GET https://registry.npmjs.org/ws 
npm http GET https://registry.npmjs.org/active-x-obfuscator/0.0.1 
npm http GET https://registry.npmjs.org/uglify-js/1.2.5 
npm http GET https://registry.npmjs.org/xmlhttprequest/1.4.2 
npm http 304 https://registry.npmjs.org/active-x-obfuscator/0.0.1 
npm http 304 https://registry.npmjs.org/ws 
npm http 304 https://registry.npmjs.org/uglify-js/1.2.5 
npm http 304 https://registry.npmjs.org/xmlhttprequest/1.4.2 
npm http GET https://registry.npmjs.org/zeparser/0.0.5 
npm http GET https://registry.npmjs.org/options 
npm http GET https://registry.npmjs.org/tinycolor 
npm http GET https://registry.npmjs.org/commander 
npm http 304 https://registry.npmjs.org/zeparser/0.0.5 
npm http 304 https://registry.npmjs.org/options 
npm http 304 https://registry.npmjs.org/tinycolor 
npm http 304 https://registry.npmjs.org/commander 

> [email protected] install E:\chat_\nodejs\node_modules\socket.io\node_modules\socket.i 
o-client\node_modules\ws 
> (node-gyp rebuild 2> builderror.log) || (exit 0) 

CreateProcessW: The system cannot find the file specified. 
npm ERR! error rolling back Error: ENOTEMPTY, rmdir 'E:\chat_\nodejs\node_module 
s\socket.io\node_modules\socket.io-client\node_modules\active-x-obfuscator\node_ 
modules\zeparser' 
npm ERR! error rolling back [email protected] { [Error: ENOTEMPTY, rmdir 
'E:\chat_\nodejs\node_modules\socket.io\node_modules\socket.io-client\node_modul 
es\active-x-obfuscator\node_modules\zeparser'] 
npm ERR! error rolling back errno: 53, 
npm ERR! error rolling back code: 'ENOTEMPTY', 
npm ERR! error rolling back path: 'E:\\chat_\\nodejs\\node_modules\\socket.io\ 
\node_modules\\socket.io-client\\node_modules\\active-x-obfuscator\\node_modules 
\\zeparser' } 
npm ERR! error rolling back Error: EPERM, readdir 'E:\chat_\nodejs\node_modules\ 
socket.io\node_modules\socket.io-client\node_modules\active-x-obfuscator\node_mo 
dules\zeparser\benchmark.html' 
npm ERR! error rolling back [email protected] { [Error: EPERM, readdir 'E:\chat_ 
\nodejs\node_modules\socket.io\node_modules\socket.io-client\node_modules\active 
-x-obfuscator\node_modules\zeparser\benchmark.html'] 
npm ERR! error rolling back errno: 50, 
npm ERR! error rolling back code: 'EPERM', 
npm ERR! error rolling back path: 'E:\\chat_\\nodejs\\node_modules\\socket.io\ 
\node_modules\\socket.io-client\\node_modules\\active-x-obfuscator\\node_modules 
\\zeparser\\benchmark.html' } 
npm ERR! [email protected] install: `(node-gyp rebuild 2> builderror.log) || (exit 0)` 
npm ERR! `cmd "/c" "(node-gyp rebuild 2> builderror.log) || (exit 0)"` failed wi 
th 127 
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.7600 
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod 
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "socket.io" 
npm ERR! cwd E:\chat_\nodejs 
npm ERR! node -v v0.8.18 
npm ERR! npm -v 1.2.2 
npm ERR! code ELIFECYCLE 
npm ERR! Error: ENOENT, lstat 'E:\chat_\nodejs\node_modules\socket.io\node_modul 
es\socket.io-client\node_modules\active-x-obfuscator\node_modules\zeparser\bench 
mark.html' 
npm ERR! If you need help, you may report this log at: 
npm ERR!  <http://github.com/isaacs/npm/issues> 
npm ERR! or email it to: 
npm ERR!  <[email protected]> 

npm ERR! System Windows_NT 6.1.7600 
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod ejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "socket.io" 
npm ERR! cwd E:\chat_\nodejs 
npm ERR! node -v v0.8.18 
npm ERR! npm -v 1.2.2 
npm ERR! path E:\chat_\nodejs\node_modules\socket.io\node_modules\socket.io-client\node_modules\active-x-obfuscator\node_modules\zeparser\benchmark.html 

npm ERR! fstream_path E : \ chat_ \ nodejs \ node_modules \ socket.io \ node_modules \ 소켓 .io 클라이언트 \ node_modules \ 액티브 X-난독 \ node_modules \ zeparser \ benchmark.html

npm ERR! fstream_type File 
npm ERR! fstream_class FileWriter 
npm ERR! code ENOENT 
npm ERR! errno 34 
npm ERR! fstream_stack C:\Program Files\nodejs\node_modules\npm\node_modules\fstream\lib\writer.js:284:26 
npm ERR! fstream_stack Object.oncomplete (fs.js:297:15) 
npm ERR! 
npm ERR! Additional logging details can be found in: 
npm ERR!  E:\chat_\nodejs\npm-debug.log 
npm ERR! not ok code 0 

내가 노드에 새로운 오전 .js 도와주세요. 미리 감사드립니다.

답변

2

문제는 ws 패키지에 있습니다. 그냥 cmd.exe을 찾을 수 없습니다. \ WINDOWS \ system32를

0

당신이 실행하는 데 필요한 모든 소프트웨어가 있는지 확인 node-gyp : % \ system32를 또는 C가 PATH 환경에 %의 SYSTEMROOT의 경로를 추가

당신 또한 환경 변수를 통해 node-gyp에 의해 사용되는 Visual Studio 버전을 구성 할 수 있으므로 npm을 설치할 때마다 --msvs_version=2012 속성을 설정하지 않아도됩니다.

예 : - https://github.com/joyent/node/blob/v0.10.29/tools/gyp/pylib/gyp/MSVSVersion.py#L209-294

전체 목록은 를 참조하십시오

  • GYP_MSVS_VERSION=2013e을 설정 2012
  • 비주얼 스튜디오에 대한 GYP_MSVS_VERSION=2012을 설정

합니다 ('e'는 '판을 표현'을 의미)

NodeJS의 Windows 사용자는 Visual Studio i의 복사본이 있다고 가정하기 때문에 여전히 고통 스럽습니다. 많은 최종 사용자가이 기능을 사용할 수 없습니다. Joyent가 CORE 노드의 일부로 웹 소켓을 포함하도록 권장하고 NodeJS 설치의 일부로 GNU gcc 컴파일러를 제공하여 영구적으로이 문제를 해결할 수 있도록 노력하고 있습니다.

:

에서 투표를 추가 부담