having a problem getting node.js to run. I'm on OSX Lion, followed the installation instructions for node. I'm on v0.5.9-pre, according to node --version, but when I try to run
node app.js
I get "Segmentation fault: 11".
The app.js file is just the hello world example from the main site:
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World\n');
}).listen(1337, "127.0.0.1");
console.log('Server running at http://127.0.0.1:1337/');
Nothing special. Tried looking over the web, but nothing seems to answer this. Any ideas?
When Segmentation fault 11 occurs, it means that a program has attempted to access a memory location that it's not allowed to access. The error can also occur if the application tries to access memory in a method that isn't allowed.
A segmentation fault occurs when a program attempts to access a memory location that it is not allowed to access, or attempts to access a memory location in a way that is not allowed (for example, attempting to write to a read-only location, or to overwrite part of the operating system). -
A segmentation fault (aka segfault) is a common condition that causes programs to crash; they are often associated with a file named core . Segfaults are caused by a program trying to read or write an illegal memory location.
Description. The npm-rebuild command will run npm build command on the matched folders. This command is particularly useful when you install a new version of node, and you have to recompile all your C++ addons with the new binary. Npm-repo. This command opens a package repository page in the browser.
I had this after upgrading from Node 0.4 to 0.6. I just needed to delete the node_modules directory from my app and re-install the dependencies with 'npm install' again.
Never mind. Just used homebrew to install node.js/npm and all working fine now. Thanks anyway.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With