(node-gyp rebuild 2 builderror.log) || (exit 0)

0

I am running sudo npm install websocket on my Mac with nodejs but it causes me this error, how to fix?

npm install websocket
-
> [email protected] install /Users/Vinicius/node_modules/websocket
> (node-gyp rebuild 2> builderror.log) || (exit 0)

  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
  SOLINK_MODULE(target) Release/bufferutil.node
  CXX(target) Release/obj.target/validation/src/validation.o
  SOLINK_MODULE(target) Release/validation.node
[email protected] node_modules/websocket
├── [email protected]
├── [email protected] ([email protected])
└── [email protected] ([email protected])
    
asked by anonymous 16.07.2015 / 07:14

1 answer

0

You need to have node-gyp as a dependency.

You should first check which version of Python is installed on your machine, we recommend the v2.7 version for greater compatibility, strong> v3.xx are not supported.

Then you need to install a C / C ++ compiler globally on your Mac, so use the following library GCC Installer for OSX

Support this install node-gyp

$ npm install -g node-gyp

Now just install the websockets

$ npm install websocket

I hope to have helped, hugs and good luck!

    
16.07.2015 / 08:38