In this JavaScript Tutorial, we will be learning how to create a JavaScript build system within Sublime Text. This will allow us to run JavaScript code outside of a browser environment and write messages to the Sublime Text console. Let’s get started.
✅ Support My Channel Through Patreon:
https://www.patreon.com/coreyms
✅ Become a Channel Member:
https://www.youtube.com/channel/UCCezIgC97PvUuR4_gbFUs5g/join
✅ One-Time Contribution Through PayPal:
https://goo.gl/649HFY
✅ Cryptocurrency Donations:
Bitcoin Wallet – 3MPH8oY2EAgbLVy7RBMinwcBntggi7qeG3
Ethereum Wallet – 0x151649418616068fB46C3598083817101d3bCD33
Litecoin Wallet – MPvEBY5fxGkmPQgocfJbxP6EmTo5UUXMot
✅ Corey’s Public Amazon Wishlist
http://a.co/inIyro1
✅ Equipment I Use and Books I Recommend:
https://www.amazon.com/shop/coreyschafer
▶️ You Can Find Me On:
My Website – http://coreyms.com/
My Second Channel – https://www.youtube.com/c/coreymschafer
Facebook – https://www.facebook.com/CoreyMSchafer
Twitter – https://twitter.com/CoreyMSchafer
Instagram – https://www.instagram.com/coreymschafer/
Original source
20 responses to “JavaScript Tutorial: Run JavaScript in Sublime Text with a NodeJS Build System”
thanks for making our life easier !!
{
"cmd": ["node","$file"],
"selector": "source.js"
}
Very clear explanation–thanks!
you are the beast man!!!
Thank a lot!!
Thanks a lot, Corey,
I used this configuration instead as a Windows' user.
{
"cmd": ["C:\Program Files\nodejs\node.exe","$file"],
"selector":"source.js"
}
well I stuck on second step "node test.js".
internal/modules/cjs/loader.js:583
throw err;
^
Error: Cannot find module 'C:Usersusernametest.js'
thx for the tutorial. I forgot restarting sublime and kept wondering why it throws Error.. errrr
I get an error saying node is not defined
was helpful
Thanks for the tip.
I'm Linux Ubuntu and this tip worked.
But the command is CTRL + B.
thanks buddy!!!!
works perfectly thank you so much! <3
can you tell me what are the prerequisites to learn javascript please. .
Perfect!!! Awesome video 🙂
Thanks for the post!
can you tell me that how did you configured your terminal.
i loved it
Excellent tutorial, exactly what I needed. And being brief was a big plus.
These are steps for a Windows 10 Home:
1. Download sublime text https://www.sublimetext.com/3 (it usually shows which one you need by black dot)
2. Download node.js at https://nodejs.org/en/ (Recommended for most users)
3. go to Tools > Build System > New Build System
4. save as Javascript in the “User” directory inside Sublime Text settings folder
{
"cmd": ["C:/Program Files/nodejs/node.exe", "$file"],
"selector": "source.js"
}5.to check it, follow the last paragraph of this article from
Time for fun part. Create and save…..
GOOD LUCK!
Windows users must use:
{
"shell_cmd": "node ${file}",
"selector" : "source.js"
}
save my day. thanks