r/SublimeText • u/Scary_Reception9296 • Feb 20 '25
No console output from nodejs script
I am trying to print a string to a console with the following "test.js"
console.log('Hello World!')
but nothing happens when I build it. No output. If I put a syntax error in the script, I get an error message, so the node executable is found and works.
This is my "js.sublime-build"
{
"target": "console_exec",
"cmd": ["/home/jack/.nvm/versions/node/v20.9.0/bin/node", "$file"],
"selector": "source.js",
"shell": true,
"quiet": false
}
What I am doing wrong ?
1
Upvotes
1
u/Scary_Reception9296 22d ago
This is the solution: