2012-03-30 40 views
5

Tôi đã tìm kiếm giờ và tôi vẫn chưa có câu trả lời cho vấn đề này. Tôi có phiên bản mac os x 10.6.8 Tôi đã cài đặt nodej từ nodejs.org. Phiên bản là v0.6.14. Tôi đã làm điều này trong thiết bị đầu cuối để kiểm tra npm: npm --version. NPM phiên bản 1.1.12 sau đó tôi đã cố gắng NPM cài đặt socket.io và tôi đã nhận lỗi này ...Mac không thể cài đặt socket.io với npm/nodejs?

pm http GET https://registry.npmjs.org/socket.io 
npm http 304 https://registry.npmjs.org/socket.io 
npm http GET https://registry.npmjs.org/socket.io-client/0.9.3 
npm http GET https://registry.npmjs.org/policyfile/0.0.4 
npm http GET https://registry.npmjs.org/redis/0.6.7 
npm http 304 https://registry.npmjs.org/redis/0.6.7 
npm http 304 https://registry.npmjs.org/policyfile/0.0.4 
npm http 304 https://registry.npmjs.org/socket.io-client/0.9.3 
npm http GET https://registry.npmjs.org/uglify-js/1.2.5 
npm http GET https://registry.npmjs.org/ws 
npm http GET https://registry.npmjs.org/xmlhttprequest/1.2.2 
npm http GET 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/active-x-obfuscator/0.0.1 
npm http 304 https://registry.npmjs.org/xmlhttprequest/1.2.2 
npm http 304 https://registry.npmjs.org/uglify-js/1.2.5 
npm http GET https://registry.npmjs.org/zeparser/0.0.5 

> [email protected] preinstall /Users/NAME/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws 
> make 

execvp(): No such file or directory 

npm ERR! Error: ENOENT, open '/Users/NAME/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/array1.js' 
npm ERR! 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! 
npm ERR! System Darwin 10.8.0 
npm ERR! command "node" "/usr/local/bin/npm" "install" "socket.io" 
npm ERR! cwd /Users/NAME 
npm ERR! node -v v0.6.14 
npm ERR! npm -v 1.1.12 
npm ERR! path /Users/NAME/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/array1.js 
npm ERR! code ENOENT 
npm ERR! message ENOENT, open '/Users/NAME/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/array1.js' 
npm ERR! errno {} 

npm ERR! [email protected] preinstall: `make` 
npm ERR! `sh "-c" "make"` failed with 127 
npm ERR! 
npm ERR! Failed at the [email protected] preinstall 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!  make 
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! 
npm ERR! System Darwin 10.8.0 
npm ERR! command "node" "/usr/local/bin/npm" "install" "socket.io" 
npm ERR! cwd /Users/NAME 
npm ERR! node -v v0.6.14 
npm ERR! npm -v 1.1.12 
npm ERR! code ELIFECYCLE 
npm ERR! message [email protected] preinstall: `make` 
npm ERR! message `sh "-c" "make"` failed with 127 
npm ERR! errno {} 
npm ERR! 
npm ERR! Additional logging details can be found in: 
npm ERR!  /Users/NAME/npm-debug.log 
npm not ok 

PLS giúp đỡ!

+0

Lỗi tương tự ở đây trên Mac OSX 10.6.8 .. –

Trả lời

0

Socket.io chạy trình tạo sau khi cài đặt và yêu cầu nút-waf để chạy. Bạn đã cài đặt nút thông qua trình quản lý gói như cổng hay bạn đã sử dụng cài đặt dmg trên trang web của nút?

chủ đề này nói đến vấn đề bạn đang gặp phải:

https://github.com/LearnBoost/socket.io/issues/773

+0

Tôi đã cài đặt nút-v0.6.14.pkg từ nodejs.org. Vì vậy, tôi đoán tôi đã cài đặt nó với trình quản lý gói? Nhưng làm cách nào để khắc phục lỗi? Tôi cần nodejs-dev để lấy nút-waf? – Chanckjh

0

Có vẻ như nếu bạn cài đặt một phiên bản trước của socket.io có được không cần phải chạy script make. Tôi đã thử các sau đây và được quản lý để có được nó được cài đặt thành công trên Mac OSX 10.6.8 của tôi:

npm install [email protected] 

Có thảo luận thêm về this google groups post.

1

Force việc cài đặt bằng

npm install socket.io -f 

Hình như các bài kiểm tra cần nút-waf, nhưng không phải là thư viện trực tiếp. Tôi hy vọng họ sẽ khắc phục những vấn đề này sau cùng.