Node: bad option: --nocrankshaft


Trying to run the sample app on the Node.JS website to start an http server.

const http = require('http');

const hostname = '';
const port = 3000;

const server = http.createServer((req, res) => {
    res.statusCode = 200;
res.setHeader('Content-Type', 'text/plain');
res.end('Hello World\n');

server.listen(port, hostname, () => {
console.log('Server running at http://${hostname}:${port}/');

I’m getting this error in the C9 IDE:

node: bad option: --nocrankshaft

I’ve tried updating to the latest Node release to no avail.


have same problem… below is my codes

let port = process.env.PORT;
let host = process.env.IP;

app.listen(process.env.PORT, host, () => { 
    console.log('Running on port ' + port + ' and IP ' + host);

i’m using default node.js runner…


Same here. I’m just trying to run the exact example provided by the ‘node-horseman’ package:

var Horseman = require('node-horseman');
var horseman = new Horseman();

  .userAgent('Mozilla/5.0 (Windows NT 6.1; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0')
  .type('input[name="q"]', 'github')
  .keyboardEvent('keypress', 16777221)
  .log() // prints out the number of results


Your code is running at
Important: use process.env.PORT as the port and process.env.IP as the host in your scripts!

node: bad option: --nocrankshaft

Process exited with code: 9


The only way I found is run node server.js at the terminal.


I had same problem.
I changed the runner from Node.js(default) to Node 0.10.x, It worked.


Thanks, running it the terminal and/or changing to the 0.10.x runner worked. However the 0.10.x runner doesn’t allow ES6 fat arrow functions, so I’m using the terminal approach.


This happened to me as well, it happened after i updated nodejs via nvm install. Changing the runner to 0.10.x worked.

Edit: I managed to use Runner: Node.js (default) by disabling the Run in Debug Mode option (the button next to the runner list).