Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialIan Mackenzie
11,062 PointsHow do I get Sublime Text to run JavaScript code inside the editor?
I use the latest stable version build 3083. How can I run JavaScript code inside this editor. I've tried a couple of suggestions off the net and both have not worked. I have Node.js and NPM installed.
7 Answers
Ian Mackenzie
11,062 PointsTo get this up and running I followed the information on wikiHow http://www.wikihow.com/Create-a-Javascript-Console-in-Sublime-Text and method one as I use a Mac.
Carlos Casciano
10,459 Pointsworked perfectly here! ty!
Craig Garrity
23,692 PointsHi, know this is an old question but if anyone is still interested in setting this up, there is a good guide here; javascript-console-in-sublime-text
Jonathan Cousins
4,160 PointsYou can't run JS inside sublime unless you have an extension which allows that sort of thing. SublimeText is build in python so potentially you can run python code from directly within the editor, but JS needs a JavaScript interpreter (like v8 or blink, etc).
I found someone who compiled the V8 engine for sublime. Maybe that's what you're looking for?
Ian Mackenzie
11,062 PointsYes Jonathan, I ended up using the command-line Javascript runner method after installing Node.js
Working fine now but thanks for your reply.
Konrad Pilch
2,435 PointsSave ht efile as .js
Ian Mackenzie
11,062 PointsThe file has a .js extension.
Konrad Pilch
2,435 PointsSo what exactly are you trying to do ?
Ian Mackenzie
11,062 Pointstrying to write some code to the console inside of sublime. Or should I say output the code.
Konrad Pilch
2,435 Pointsaa , sorry , im not familiar with that .But there is something in developement tools i think that go throw this kind of stuff maybe? if i remember well not sure but you might check out there quickly and maybe there will be something .
Ian Mackenzie
11,062 PointsOk, thanks.
Konrad Pilch
2,435 PointsKonrad Pilch
2,435 PointsHi Ian Mackenzie !
It;s been 10months since then, could i ask you what have you learned and hows your life about this thing?