Create a Javascript console in Sublime


Download Node.js and run the install


In Sublime, go to Tools > Build System > New Build System and paste the following code:

Make sure this is the only code you see.


Save the file as “node.sublime-build” in the default “user” folder, which should already be populated for you.

If you receive a [Errno 2] error when trying to use the console, then you’ll need to change “node” in the code above to the path where node is located. To do this, type ‘which node’ in terminal, copy the url path, and paste over “node” in your code.

How to use the console:

Load your Javascript file into Sublime and go to Tools > Build System in the top bar and select “node”. This is the build system that you just created.

Now just click command + b whenever you want to build (run) the JS file!

(Visited 150 times, 1 visits today)

Leave A Comment

Your email address will not be published. Required fields are marked *