CNode

npm install socket.io安装socket.io出错

Ppestd发布于14 年前最后回复14 年前3 回复8721 浏览0 收藏

npm install socket.io 出错: [ws v0.4.18] Attempting to compile blazing fast native extensions.

[ws v0.4.18] Native extension compilation failed.

[ws v0.4.18] On Windows, native extensions require Visual Studio and Python.

[ws v0.4.18] On Unix, native extensions require Python, make and a C++ compiler.

[ws v0.4.18] Start npm with --ws:verbose to show compilation output (if any).

查看回复

回复 (3)

C
conan007ai#1·14 年前

这样的情况下其实开发也是可以进行的 如果用的是mac os, 装了xcode么?

J
jiyinyiyong#2·14 年前

这是全部的错误提示吗? 感觉像缺少开发环境..

P
pestd#3·14 年前

[root@localhost gyp]# npm install socket.io

npm http GET https://registry.npmjs.org/socket.io npm http 304 https://registry.npmjs.org/socket.io npm http GET https://registry.npmjs.org/policyfile/0.0.4 npm http GET https://registry.npmjs.org/redis/0.6.7 npm http GET https://registry.npmjs.org/socket.io-client/0.9.6 npm http 304 https://registry.npmjs.org/policyfile/0.0.4 npm http 304 https://registry.npmjs.org/redis/0.6.7 npm http 304 https://registry.npmjs.org/socket.io-client/0.9.6 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/active-x-obfuscator/0.0.1 npm http 304 https://registry.npmjs.org/ws 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 304 https://registry.npmjs.org/zeparser/0.0.5 npm http 304 https://registry.npmjs.org/options npm http 304 https://registry.npmjs.org/commander npm http 304 https://registry.npmjs.org/tinycolor

ws@0.4.18 install /root/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws node install.js

[ws v0.4.18] Attempting to compile blazing fast native extensions. [ws v0.4.18] Native extension compilation failed. [ws v0.4.18] On Windows, native extensions require Visual Studio and Python. [ws v0.4.18] On Unix, native extensions require Python, make and a C++ compiler. [ws v0.4.18] Start npm with --ws:verbose to show compilation output (if any).

参与回复
登录后即可参与回复。登录