2012-03-22 3 views
1

は、それが次のメッセージNPMはエラーでsocket.ioを構築するために失敗し、「ノード/ NPMのバージョンと互換性がありません:[email protected]」私は<a href="https://github.com/LearnBoost/socket.io.git" rel="nofollow">https://github.com/LearnBoost/socket.io.git</a>からsocket.ioクローン

npm http GET https://registry.npmjs.org/socket.io-client/0.9.2 
npm http 304 https://registry.npmjs.org/socket.io-client/0.9.2 
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/uglify-js/1.2.5 
npm http 304 https://registry.npmjs.org/xmlhttprequest/1.2.2 
npm http 304 https://registry.npmjs.org/ws 
npm http 304 https://registry.npmjs.org/active-x-obfuscator/0.0.1 

> [email protected] preinstall /usr/src/socket.io/node_modules/socket.io-client/node_modules/ws 
> make 

npm http GET https://registry.npmjs.org/zeparser/0.0.5 
node-waf configure build 
Checking for program g++ or c++   : /usr/bin/g++ 
Checking for program cpp     : /usr/bin/cpp 
Checking for program ar     : /usr/bin/ar 
Checking for program ranlib    : /usr/bin/ranlib 
Checking for g++       : ok 
Checking for node path     : not found 
Checking for node prefix     : ok /usr/local 
'configure' finished successfully (0.105s) 
Waf: Entering directory `/usr/src/socket.io/node_modules/socket.io-client/node_modules/ws/build' 
[1/4] cxx: src/validation.cc -> build/Release/src/validation_1.o 
[2/4] cxx: src/bufferutil.cc -> build/Release/src/bufferutil_2.o 
[3/4] cxx_link: build/Release/src/validation_1.o -> build/Release/validation.node 
[4/4] cxx_link: build/Release/src/bufferutil_2.o -> build/Release/bufferutil.node 
Waf: Leaving directory `/usr/src/socket.io/node_modules/socket.io-client/node_modules/ws/build' 
'build' finished successfully (1.634s) 
npm http GET https://registry.npmjs.org/commander/0.5.0 
npm http GET https://registry.npmjs.org/options 
npm http 304 https://registry.npmjs.org/zeparser/0.0.5 
npm http GET https://registry.npmjs.org/zeparser/-/zeparser-0.0.5.tgz 
npm http 304 https://registry.npmjs.org/options 
npm http 304 https://registry.npmjs.org/commander/0.5.0 
npm ERR! error rolling back [email protected] Error: ENOTEMPTY, rmdir '/usr/src/socket.io/node_modules/socket.io-client/node_modules/ws' 
npm ERR! error rolling back [email protected] Error: ENOTEMPTY, rmdir '/usr/src/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/options/test' 

npm ERR! Unsupported 
npm ERR! Not compatible with your version of node/npm: [email protected] 
npm ERR! Required: {"node":">= 0.4.x < 0.7.0"} 
npm ERR! Actual: {"npm":"1.1.10","node":"0.7.7-pre"} 
npm ERR! 
npm ERR! System Linux 2.6.38-11-generic 
npm ERR! command "node" "/usr/local/bin/npm" "install" 
npm ERR! cwd /usr/src/socket.io 
npm ERR! node -v v0.7.7-pre 
npm ERR! npm -v 1.1.10 
npm ERR! code ENOTSUP 
npm ERR! message Unsupported 
npm ERR! errno {} 
npm ERR! 
npm ERR! Additional logging details can be found in: 
npm ERR!  /usr/src/socket.io/npm-debug.log 
npm not ok 

で失敗ビット私の現在のバージョンのノードとnpmは次の通りです

[email protected]:/usr/src/socket.io# node -v 
v0.7.7-pre 
[email protected]:/usr/src/socket.io# npm -v 
1.1.10 
[email protected]:/usr/src/socket.io# 
[email protected]:/usr/src/socket.io# uname -a 
Linux abhibhat-VirtualBox 2.6.38-11-generiC#50-Ubuntu SMP Mon Sep 12 21:18:14 UTC 2011 i686 i686 i386 GNU/Linux 
[email protected]:/usr/src/socket.io# 

私のノードのバージョンがサポートされている上限よりも高いですか?もしそうなら、解決策は何ですか?

私はここから進める方法については無知です。助けてください!!

+0

解決策は、サポートされているノードバージョンを使用することです。とにかく0.6は安定しています。あるいは、 'package.json'ファイルを編集して上限を取り除いて、ノードv0.7で動作するかどうか確認してください。 – fent

+1

@DeaDEnD:npm -f install socket.ioで問題を直しました。私はpackage.jsonをチェックして、上限の '' engines ":{" node ":"> = 0.4.0 "}とは思われません。奇妙なことに、 'npm -f install'を発行する前に、' npm -g list'を発行しなければならなかったのですが、それがどうやって問題を解決したのかはわかりません。 – Abhijit

+0

ああ。インストール時に '-f'フラグを使うことができるかどうかは分かりませんでした。ありがとう! – fent

答えて

4

npm -f install socket.ioただ問題を解決しました。私もpackage.jsonをチェックし、上限 "エンジン"はないようです:{"node": "> = 0.4.0"}。奇妙なことに、npm -f installを発行する前にnpm -g listを発行しなければなりませんでしたが、問題がどのように解決されたのかはわかりません。

+0

" - force"や "-f"オプションを使用した場合のようですが、もちろん "動作する"ようです... – conradkdotcom

関連する問題