socket.io没有安装

时间:2014-07-03 19:44:54

标签: node.js socket.io

尽我所能,在网上查询问题。好像我是唯一一个在安装socket.io

时遇到问题的人

我如何调试此输出?

# npm install -g 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-1.0.6.tgz
npm http 200 https://registry.npmjs.org/socket.io/-/socket.io-1.0.6.tgz
npm http GET https://registry.npmjs.org/engine.io/1.3.1
npm http GET https://registry.npmjs.org/socket.io-parser/2.2.0
npm http GET https://registry.npmjs.org/socket.io-adapter/0.2.0
npm http GET https://registry.npmjs.org/socket.io-client/1.0.6
npm http GET https://registry.npmjs.org/has-binary-data/0.1.1
npm http GET https://registry.npmjs.org/debug/0.7.4
npm http 200 https://registry.npmjs.org/has-binary-data/0.1.1
npm http 200 https://registry.npmjs.org/socket.io-client/1.0.6
npm http GET https://registry.npmjs.org/has-binary-data/-/has-binary-data-0.1.1.tgz
npm http GET https://registry.npmjs.org/socket.io-client/-/socket.io-client-1.0.6.tgz
npm http 200 https://registry.npmjs.org/socket.io-parser/2.2.0
npm http GET https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-2.2.0.tgz
npm http 200 https://registry.npmjs.org/socket.io-adapter/0.2.0
npm http GET https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-0.2.0.tgz
npm http 200 https://registry.npmjs.org/has-binary-data/-/has-binary-data-0.1.1.tgz
npm http 200 https://registry.npmjs.org/socket.io-client/-/socket.io-client-1.0.6.tgz
npm http 200 https://registry.npmjs.org/debug/0.7.4
npm http 200 https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-2.2.0.tgz
npm http 200 https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-0.2.0.tgz
npm http GET https://registry.npmjs.org/debug/-/debug-0.7.4.tgz
npm http 200 https://registry.npmjs.org/engine.io/1.3.1
npm http GET https://registry.npmjs.org/engine.io/-/engine.io-1.3.1.tgz
npm http 200 https://registry.npmjs.org/debug/-/debug-0.7.4.tgz
npm http 200 https://registry.npmjs.org/engine.io/-/engine.io-1.3.1.tgz
npm http GET https://registry.npmjs.org/socket.io-parser/2.1.2
npm http GET https://registry.npmjs.org/isarray/0.0.1
npm http GET https://registry.npmjs.org/json3/3.2.6
npm http GET http://github.com/component/emitter/archive/1.0.1.tar.gz
npm http GET https://registry.npmjs.org/engine.io-parser/1.0.6
npm http GET https://registry.npmjs.org/base64id/0.1.0
npm http GET https://registry.npmjs.org/debug/0.6.0
npm http GET https://registry.npmjs.org/ws/0.4.31
npm http 200 https://registry.npmjs.org/isarray/0.0.1
npm http GET https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz
npm http 200 https://registry.npmjs.org/socket.io-parser/2.1.2
npm http GET https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-2.1.2.tgz
npm http 200 https://registry.npmjs.org/json3/3.2.6
npm http GET https://registry.npmjs.org/json3/-/json3-3.2.6.tgz
npm http 200 https://registry.npmjs.org/ws/0.4.31
npm http GET https://registry.npmjs.org/ws/-/ws-0.4.31.tgz
npm http 200 https://registry.npmjs.org/debug/0.6.0
npm http GET https://registry.npmjs.org/debug/-/debug-0.6.0.tgz
npm http 200 https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz
npm http 200 https://registry.npmjs.org/base64id/0.1.0
npm http 200 https://registry.npmjs.org/engine.io-parser/1.0.6
npm http 200 https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-2.1.2.tgz
npm http GET https://registry.npmjs.org/base64id/-/base64id-0.1.0.tgz
npm http GET https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-1.0.6.tgz
npm http 200 https://registry.npmjs.org/json3/-/json3-3.2.6.tgz
npm http 200 https://registry.npmjs.org/ws/-/ws-0.4.31.tgz
npm http 200 https://registry.npmjs.org/debug/-/debug-0.6.0.tgz
npm http 200 https://registry.npmjs.org/base64id/-/base64id-0.1.0.tgz
npm http 200 https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-1.0.6.tgz
npm http 200 http://github.com/component/emitter/archive/1.0.1.tar.gz
npm http GET https://registry.npmjs.org/component-emitter/1.1.2
npm http GET https://registry.npmjs.org/indexof/0.0.1
npm http GET https://registry.npmjs.org/object-component/0.0.3
npm http GET https://registry.npmjs.org/parseuri/0.0.2
npm http GET https://registry.npmjs.org/to-array/0.1.3
npm http GET https://registry.npmjs.org/engine.io-client/1.3.1
npm http GET https://registry.npmjs.org/component-bind/1.0.0
npm http 200 https://registry.npmjs.org/object-component/0.0.3
npm http 200 https://registry.npmjs.org/parseuri/0.0.2
npm http 200 https://registry.npmjs.org/to-array/0.1.3
npm http GET https://registry.npmjs.org/object-component/-/object-component-0.0.3.tgz
npm http GET https://registry.npmjs.org/parseuri/-/parseuri-0.0.2.tgz
npm http 200 https://registry.npmjs.org/indexof/0.0.1
npm http GET https://registry.npmjs.org/to-array/-/to-array-0.1.3.tgz
npm http GET https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz
npm http 200 https://registry.npmjs.org/component-bind/1.0.0
npm http GET https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz
npm http 200 https://registry.npmjs.org/object-component/-/object-component-0.0.3.tgz
npm http 200 https://registry.npmjs.org/parseuri/-/parseuri-0.0.2.tgz
npm http 200 https://registry.npmjs.org/to-array/-/to-array-0.1.3.tgz
npm http 200 https://registry.npmjs.org/engine.io-client/1.3.1
npm http 200 https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz
npm http 200 https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz
npm http GET https://registry.npmjs.org/engine.io-client/-/engine.io-client-1.3.1.tgz
npm http 200 https://registry.npmjs.org/component-emitter/1.1.2
npm http GET https://registry.npmjs.org/component-emitter/-/component-emitter-1.1.2.tgz
npm http 200 https://registry.npmjs.org/engine.io-client/-/engine.io-client-1.3.1.tgz
npm http 200 https://registry.npmjs.org/component-emitter/-/component-emitter-1.1.2.tgz
npm http GET https://registry.npmjs.org/better-assert
npm http 200 https://registry.npmjs.org/better-assert
npm http GET https://registry.npmjs.org/better-assert/-/better-assert-1.0.0.tgz
npm http 200 https://registry.npmjs.org/better-assert/-/better-assert-1.0.0.tgz
npm http GET https://registry.npmjs.org/component-inherit/0.0.3
npm http GET https://registry.npmjs.org/parsejson/0.0.1
npm http GET https://registry.npmjs.org/parseqs/0.0.2
npm http GET https://registry.npmjs.org/has-cors/1.0.3
npm http GET https://github.com/LearnBoost/node-XMLHttpRequest/archive/0f36d0b5ebc03d85f860d42a64ae9791e1daa433.tar.gz
npm http 200 https://registry.npmjs.org/component-inherit/0.0.3
npm http GET https://registry.npmjs.org/component-inherit/-/component-inherit-0.0.3.tgz
npm http 200 https://registry.npmjs.org/parseqs/0.0.2
npm http 200 https://registry.npmjs.org/has-cors/1.0.3
npm http GET https://registry.npmjs.org/parseqs/-/parseqs-0.0.2.tgz
npm http GET https://registry.npmjs.org/has-cors/-/has-cors-1.0.3.tgz
npm http GET https://registry.npmjs.org/arraybuffer.slice/0.0.6
npm http GET https://registry.npmjs.org/blob/0.0.2
npm http GET https://registry.npmjs.org/utf8/2.0.0
npm http GET https://registry.npmjs.org/base64-arraybuffer/0.1.2
npm http GET https://registry.npmjs.org/after/0.8.1
npm http 200 https://registry.npmjs.org/component-inherit/-/component-inherit-0.0.3.tgz
npm http 200 https://registry.npmjs.org/parseqs/-/parseqs-0.0.2.tgz
npm http 200 https://registry.npmjs.org/has-cors/-/has-cors-1.0.3.tgz
npm http 200 https://registry.npmjs.org/base64-arraybuffer/0.1.2
npm http 200 https://registry.npmjs.org/parsejson/0.0.1
npm http 200 https://registry.npmjs.org/blob/0.0.2
npm http 200 https://registry.npmjs.org/arraybuffer.slice/0.0.6
npm http GET https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.2.tgz
npm http GET https://registry.npmjs.org/parsejson/-/parsejson-0.0.1.tgz
npm http GET https://registry.npmjs.org/blob/-/blob-0.0.2.tgz
npm http GET https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.6.tgz
npm http 200 https://registry.npmjs.org/after/0.8.1
npm http 200 https://github.com/LearnBoost/node-XMLHttpRequest/archive/0f36d0b5ebc03d85f860d42a64ae9791e1daa433.tar.gz
npm http GET https://registry.npmjs.org/after/-/after-0.8.1.tgz
npm http 200 https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.2.tgz
npm http 200 https://registry.npmjs.org/parsejson/-/parsejson-0.0.1.tgz
npm http 200 https://registry.npmjs.org/blob/-/blob-0.0.2.tgz
npm http 200 https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.6.tgz
npm http 200 https://registry.npmjs.org/after/-/after-0.8.1.tgz
npm http GET https://registry.npmjs.org/callsite/1.0.0
npm http 200 https://registry.npmjs.org/utf8/2.0.0
npm http GET https://registry.npmjs.org/utf8/-/utf8-2.0.0.tgz
npm http 200 https://registry.npmjs.org/callsite/1.0.0
npm http 200 https://registry.npmjs.org/utf8/-/utf8-2.0.0.tgz
npm http GET https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz
npm http 200 https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz
npm http GET https://github.com/component/global/archive/v2.0.1.tar.gz
npm http GET https://registry.npmjs.org/tinycolor
npm http GET https://registry.npmjs.org/options
npm http GET https://registry.npmjs.org/commander
npm http GET https://registry.npmjs.org/nan
npm http 200 https://registry.npmjs.org/tinycolor
npm http GET https://registry.npmjs.org/tinycolor/-/tinycolor-0.0.1.tgz
npm http 200 https://registry.npmjs.org/commander
npm http 200 https://registry.npmjs.org/options
npm http GET https://registry.npmjs.org/commander/-/commander-0.6.1.tgz
npm http 200 https://registry.npmjs.org/nan
npm http GET https://registry.npmjs.org/options/-/options-0.0.5.tgz
npm http GET https://registry.npmjs.org/nan/-/nan-0.3.2.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
npm http 200 https://registry.npmjs.org/options/-/options-0.0.5.tgz
npm http 200 https://registry.npmjs.org/nan/-/nan-0.3.2.tgz
npm http 200 https://github.com/component/global/archive/v2.0.1.tar.gz

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


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

make: Entering directory `/usr/lib/node_modules/socket.io/node_modules/engine.io/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
make: Entering directory `/usr/lib/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/build'
  CXX(target) Release/obj.target/validation/src/validation.o
  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
  SOLINK_MODULE(target) Release/obj.target/bufferutil.node
  SOLINK_MODULE(target) Release/obj.target/validation.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: Finished
  COPY Release/validation.node
make: Leaving directory `/usr/lib/node_modules/socket.io/node_modules/engine.io/node_modules/ws/build'
  SOLINK_MODULE(target) Release/obj.target/validation.node
  SOLINK_MODULE(target) Release/obj.target/validation.node: Finished
  COPY Release/validation.node
make: Leaving directory `/usr/lib/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/build'
npm WARN unmet dependency /usr/lib/node_modules/block-stream requires inherits@'~2.0.0' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
npm WARN unmet dependency /usr/lib/node_modules/fstream requires inherits@'~2.0.0' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
npm WARN unmet dependency /usr/lib/node_modules/fstream-ignore requires inherits@'2' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
npm WARN unmet dependency /usr/lib/node_modules/fstream-npm requires inherits@'2' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
npm WARN unmet dependency /usr/lib/node_modules/glob requires inherits@'2' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
npm WARN unmet dependency /usr/lib/node_modules/npmconf requires inherits@'~2.0.0' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
npm WARN unmet dependency /usr/lib/node_modules/tar requires inherits@'2' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
socket.io@1.0.6 /usr/lib/node_modules/socket.io
âââ debug@0.7.4
âââ has-binary-data@0.1.1 (isarray@0.0.1)
âââ socket.io-parser@2.2.0 (isarray@0.0.1, emitter@1.0.1, json3@3.2.6)
âââ socket.io-adapter@0.2.0 (socket.io-parser@2.1.2)
âââ engine.io@1.3.1 (base64id@0.1.0, debug@0.6.0, engine.io-parser@1.0.6, ws@0.4.31)
âââ socket.io-client@1.0.6 (to-array@0.1.3, indexof@0.0.1, component-bind@1.0.0, object-component@0.0.3, component-emitter@1.1.2, parseuri@0.0.2, engine.io-client@1.3.1)

当我运行node.js代码时,我得到:

module.js:340
    throw err;
          ^
Error: Cannot find module 'socket.io'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/var/www/html/mysite.com/node.js/subscriber.js:3:10)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)

0 个答案:

没有答案