Can't use node v8.x runner


#1

I need to use nodeJS v8+ because my code makes use of v8 features such as the “await” keyword for asynchronous commands. However, after I upgrade node, the runner fails to start my project due to the following error messages:

node: bad option: --nocrankshaft
node: bad option: --nodead_code_elimination

Steps to reproduce:

Upgrade node to v8

$ nvm use 8
Now using node v8.9.0 (npm v5.5.1)
$ nvm alias default 8
default -> 8 (-> v8.9.0)

Click on green Run button


#2

While I’m not sure of the cause of this, I can provide a fix. First, click on Runner: Node.js (default). Then, scroll to the bottom of the dropdown, and click Edit Runner. Then, simply remove the --nocrankshaft and --nodead_code_elimination flags on line 8. You can also replace --debug-brk with --inspect-brk if you want (Node.js 8 uses different flags for debugging, unfortunately Cloud9 is still working on supporting the version 8 debugging, so this won’t do anything yet).

EDIT: If you get an error regarding saving the runner file, try running the following: sudo chown -R ubuntu:ubuntu .c9/runners/


#3

Hey @dannytech, thanks for the swift and useful response! Your fix worked perfectly, and as an added bonus I can now create my own runners! Thanks!


#4

I have the same problem. I just install C9 on Ubuntu to learning node.js. I have installed with nvm node 6 and 8. But when i click on the green RUN button, debug mode does not work and the code do not run. I can only run the app if i disable debug mode.
I have already edited the node.js.run file, but that did not solve the problem. Please help.