Comments (13)
I just released version 1.0.7 with a complete overhaul of the native module building process. It seems to work for me across the board. Try that and let me know how you fare.
from websocket-node.
Hi
Finally I upgrade all:
Node
:v0.8.6
Xcode
:v4.4.1
And I have attempted install it another time, but seems that i have same problem:
ncpro:test_server makensi$ npm install websocket --websocket:verbose
npm WARN package.json [email protected] No README.md file found!
npm http GET https://registry.npmjs.org/websocket
npm http 304 https://registry.npmjs.org/websocket
> [email protected] install /Users/makensi/Projects/workspace_node/test/test_server/node_modules/websocket
> node install.js
[websocket v1.0.7] Attempting to compile native extensions.
CXX(target) Release/obj.target/validation/src/validation.o
make: c++: No such file or directory
make: *** [Release/obj.target/validation/src/validation.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:215:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:91:17)
gyp ERR! stack at Process._handle.onexit (child_process.js:674:10)
gyp ERR! System Darwin 11.4.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/makensi/Projects/workspace_node/test/test_server/node_modules/websocket
gyp ERR! node -v v0.8.6
gyp ERR! node-gyp -v v0.6.3
gyp ERR! not ok
[websocket v1.0.7]
Native code compile failed!!
On Windows, native extensions require Visual Studio and Python.
On Unix, native extensions require Python, make and a C++ compiler.
Start npm with --websocket:verbose to show compilation output (if any).
[email protected] node_modules/websocket
Are there extra requirements(like Windows systems) needed to compile it?
from websocket-node.
It looks like the "make" command can't find your C++ compiler. Have you compiled other software on the command line before?
I recommend installing Homebrew and compiling something small with that. I suspect once you have Homebrew working, this will work as well.
Homebrew can be found here: http://mxcl.github.com/homebrew/
However, as of version 1.0.7, WebSocket-Node will now still work even though the native module compilation failed. I added JavaScript fallback implementations. It won't be as fast, and it won't validate against receiving invalid UTF-8 data, but otherwise it will work just fine.
Brian
Sent from my iPhone
On Aug 14, 2012, at 12:35 PM, makensi [email protected] wrote:
Hi
Finally I upgrade all:
Node: v0.8.6
Xcode: v4.4.1
And I have attempted install it another time, but seems that i have same problem:ncpro:test_server makensi$ npm install websocket --websocket:verbose
npm WARN package.json [email protected] No README.md file found!
npm http GET https://registry.npmjs.org/websocket
npm http 304 https://registry.npmjs.org/websocket[email protected] install /Users/makensi/Projects/workspace_node/test/test_server/node_modules/websocket
node install.js[websocket v1.0.7] Attempting to compile native extensions.
CXX(target) Release/obj.target/validation/src/validation.o
make: c++: No such file or directory
make: *** [Release/obj.target/validation/src/validation.o] Error 1
gyp ERR! build error
gyp ERR! stack Error:make
failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:215:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:91:17)
gyp ERR! stack at Process._handle.onexit (child_process.js:674:10)
gyp ERR! System Darwin 11.4.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/makensi/Projects/workspace_node/test/test_server/node_modules/websocket
gyp ERR! node -v v0.8.6
gyp ERR! node-gyp -v v0.6.3
gyp ERR! not ok
[websocket v1.0.7]
Native code compile failed!!
On Windows, native extensions require Visual Studio and Python.
On Unix, native extensions require Python, make and a C++ compiler.
Start npm with --websocket:verbose to show compilation output (if any).
[email protected] node_modules/websocket
Are there extra requirements(like Windows systems) needed to compile it?—
Reply to this email directly or view it on GitHub.
from websocket-node.
This is an XCode configuration issue on your machine. Are you sure you have the command line tools installed?
from websocket-node.
Any update on this?
from websocket-node.
Closing, as I don't believe this to be an issue with WebSocket-Node.
from websocket-node.
Hi,
Sorry but i took several vacation days :P.
Finally, I found it. Seems that exists something wrong inside global node modules. After remove them (global node_modules directory) compilation was perfect.
ncpro:test_server makensi$ npm install websocket --websocket:verbose
npm http GET https://registry.npmjs.org/websocket
npm http 304 https://registry.npmjs.org/websocket
> [email protected] install /Users/makensi/Projects/workspace_node/test/test_server/node_modules/websocket
> node install.js
[websocket v1.0.7] Attempting to compile native extensions.
gyp http GET http://nodejs.org/dist/v0.8.7/node-v0.8.7.tar.gz
gyp http 200 http://nodejs.org/dist/v0.8.7/node-v0.8.7.tar.gz
CXX(target) Release/obj.target/validation/src/validation.o
SOLINK_MODULE(target) Release/validation.node
SOLINK_MODULE(target) Release/validation.node: Finished
CXX(target) Release/obj.target/xor/src/xor.o
SOLINK_MODULE(target) Release/xor.node
SOLINK_MODULE(target) Release/xor.node: Finished
[websocket v1.0.7] Native extension compilation successful!
[email protected] node_modules/websocket
ncpro:lysk_server makensi$
Thanks for all your help.
from websocket-node.
hi buddy, Can you explain what is "global node_modules directory" and how to change it ? thanks a lot!
from websocket-node.
Hi,
I thought that it was related with an one update that I did on my node installation with pkg installator. I just remove all modules under:
/usr/local/lib/node_modules
And finally I have reinstalled them; mainly gyp module which was throwing errors every websocket module built.
I hope that it will be useful for you
from websocket-node.
Indeed, I have not used the pkg installer for Mac OS X and instead use nvm to install node, as I expect the vast majority of other developers do as well. This is far preferable since it allows you to switch instantly between multiple versions of node to test things.
Before using nvm, I generally used Homebrew or compiled and installed from the node.js source manually, which was also quite easy to do.
from websocket-node.
Job done! Thanks for your adivse.
The Real thing that created this problem is that websocket make process can not find the offical node.js installation path.
so the officall nod.js install in /usr/local/lib and /usr/local/bin
But using nvm the author mentioned the path way is another. like this :
shao19@mac:~/nvm/V0.8.6/bin > ll
total 19656
-rwxr-xr-x 1 shao19 staff 10053684 9 5 11:08 node
-rwxr-xr-x 1 shao19 staff 355 8 8 02:56 node-waf
lrwxr-xr-x 1 shao19 staff 38 9 5 11:08 npm -> ../lib/node_modules/npm/bin/npm-cli.js
this is the whole different pathway that the websocket makefile can't not find the nod.js header file.so the issue appeared.
And I think we can solve this problem by writing the compatible makefile to adapt the offical installation path.
from websocket-node.
I have no idea how that could be, since the Makefile doesn't reference any paths directly at all.
https://github.com/Worlize/WebSocket-Node/blob/0a05f4ede0c2f70381ee6f0e20bcc04aefa467c0/Makefile
from websocket-node.
If there is a bug relating to paths, it's a bug in node-gyp, which is responsible for creating all the platform-specific artifacts required to do a native module compilation, not in websocket-node.
from websocket-node.
Related Issues (20)
- The NPM package is not a place for politics HOT 1
- The NPM package is not a place for politics HOT 2
- Get URL Parameters HOT 1
- Ssl using cloudflare
- Send bytes query
- broadcast
- How to connect to multiple WebSockets? HOT 1
- install of websocket and immediatly disapear
- How Can we get Connection URL from w3cwebsocket to webSocket.Server Connection
- Similar to emit socket.io HOT 1
- send to all connected clients HOT 2
- Getting vulnerable issue [email protected]
- Need more docs on the usage of client
- Unable to connect with auth info in url and special characters HOT 1
- connection.on('message', ...) - where this event is emitted ? HOT 1
- This pkg appears abandoned. I recommend switching to "ws", it's a very similar implementation HOT 4
- Malware dependency
- Update UTF-8 Validation Code
- Request to Upgrade es5-ext Dependency to Resolve Veracode Vulnerability HOT 5
- websocket doesn't work under bun HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from websocket-node.