Reputation: 2028
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?
Upvotes: 8
Views: 9071
Reputation: 2028
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.
Upvotes: 10
Reputation: 2028
Never mind. Just used homebrew to install node.js/npm and all working fine now. Thanks anyway.
Upvotes: 4