0

新しいCentos 6.4(仮想マシン上)にnpm経由でsocket.ioをインストールしようとしています。(はい、ルートとして実行しています - この VM をテスト目的で使用しているだけです)

[root@localhost lib]# npm cache clean
[root@localhost lib]# npm install socket.io
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/-/socket.io-0.9.14.tgz
npm http 200 https://registry.npmjs.org/socket.io/-/socket.io-0.9.14.tgz
npm http GET https://registry.npmjs.org/socket.io-client/0.9.11
npm http GET https://registry.npmjs.org/base64id/0.1.0
npm http GET https://registry.npmjs.org/policyfile/0.0.4
npm http GET https://registry.npmjs.org/redis/0.7.3
npm http 200 https://registry.npmjs.org/base64id/0.1.0
npm http 200 https://registry.npmjs.org/policyfile/0.0.4
npm http GET https://registry.npmjs.org/base64id/-/base64id-0.1.0.tgz
npm http GET https://registry.npmjs.org/policyfile/-/policyfile-0.0.4.tgz
npm http 200 https://registry.npmjs.org/socket.io-client/0.9.11
npm http GET https://registry.npmjs.org/socket.io-client/-/socket.io-client-0.9.11.tgz
npm http 200 https://registry.npmjs.org/redis/0.7.3
npm http GET https://registry.npmjs.org/redis/-/redis-0.7.3.tgz
npm http 200 https://registry.npmjs.org/policyfile/-/policyfile-0.0.4.tgz
npm http 200 https://registry.npmjs.org/base64id/-/base64id-0.1.0.tgz
npm http 200 https://registry.npmjs.org/socket.io-client/-/socket.io-client-0.9.11.tgz
npm http 200 https://registry.npmjs.org/redis/-/redis-0.7.3.tgz
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/active-x-obfuscator/0.0.1
npm http GET https://registry.npmjs.org/xmlhttprequest/1.4.2
npm http 200 https://registry.npmjs.org/active-x-obfuscator/0.0.1
npm http 200 https://registry.npmjs.org/uglify-js/1.2.5
npm http GET https://registry.npmjs.org/active-x-obfuscator/-/active-x-obfuscator-0.0.1.tgz
npm http GET https://registry.npmjs.org/uglify-js/-/uglify-js-1.2.5.tgz
npm http 200 https://registry.npmjs.org/xmlhttprequest/1.4.2
npm http GET https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.4.2.tgz
npm http 200 https://registry.npmjs.org/ws
npm http GET https://registry.npmjs.org/ws/-/ws-0.4.25.tgz
npm http 200 https://registry.npmjs.org/active-x-obfuscator/-/active-x-obfuscator-0.0.1.tgz
npm http 200 https://registry.npmjs.org/uglify-js/-/uglify-js-1.2.5.tgz
npm http 200 https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.4.2.tgz
npm http 200 https://registry.npmjs.org/ws/-/ws-0.4.25.tgz
npm http GET https://registry.npmjs.org/zeparser/0.0.5
npm http GET https://registry.npmjs.org/commander
npm http GET https://registry.npmjs.org/tinycolor
npm http GET https://registry.npmjs.org/options
npm http 200 https://registry.npmjs.org/zeparser/0.0.5
npm http GET https://registry.npmjs.org/zeparser/-/zeparser-0.0.5.tgz
npm http 200 https://registry.npmjs.org/options
npm http 200 https://registry.npmjs.org/tinycolor
npm http GET https://registry.npmjs.org/options/-/options-0.0.5.tgz
npm http GET https://registry.npmjs.org/tinycolor/-/tinycolor-0.0.1.tgz
npm http 200 https://registry.npmjs.org/zeparser/-/zeparser-0.0.5.tgz
npm http 200 https://registry.npmjs.org/commander
npm http GET https://registry.npmjs.org/commander/-/commander-0.6.1.tgz
npm http 200 https://registry.npmjs.org/options/-/options-0.0.5.tgz
npm http 200 https://registry.npmjs.org/tinycolor/-/tinycolor-0.0.1.tgz
npm http 200 https://registry.npmjs.org/commander/-/commander-0.6.1.tgz

> ws@0.4.25 install /lib/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)

make: Entering directory `/lib/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build'
  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
  SOLINK_MODULE(target) Release/obj.target/bufferutil.node
  SOLINK_MODULE(target) Release/obj.target/bufferutil.node: Finished
  COPY Release/bufferutil.node
  CXX(target) Release/obj.target/validation/src/validation.o
  SOLINK_MODULE(target) Release/obj.target/validation.node
  SOLINK_MODULE(target) Release/obj.target/validation.node: Finished
  COPY Release/validation.node
make: Leaving directory `/lib/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build'
socket.io@0.9.14 node_modules/socket.io
├── base64id@0.1.0
├── policyfile@0.0.4
├── redis@0.7.3
└── socket.io-client@0.9.11 (xmlhttprequest@1.4.2, uglify-js@1.2.5, ws@0.4.25, active-x-obfuscator@0.0.1)
[root@localhost lib]# 

この builderror.log ファイルを確認すると、完全に空であることがわかります。

[root@localhost lib]# cat /lib/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/builderror.log 
[root@localhost lib]# 

npm ls -g

システムに socket.io モジュールがインストールされていないと表示されます。

ご協力いただきありがとうございます!

4

1 に答える 1

0

あなたのビルドは完全に成功したようです。

npmがsocket.io libが配置されているパスを見つけることができなかったという問題を残します。

/lib/node_modules を環境変数 $NODE_PATH に追加してみてください:

export NODE_PATH=$NODE_PATH;/lib/node_modules
于 2013-06-06T15:25:07.500 に答える