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).
[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).
这样的情况下其实开发也是可以进行的 如果用的是mac os, 装了xcode么?