Sublime Forum

Console Log not Working as Desired

#1

Hi,
I am using Sublime 3, build is node.js

When I hit Ctl+B, I would like to see console result like I see in browsers.
console.log("This is Console");
But its not working as expected as you can see.

0 Likes

#2

That looks like the bottom of an error message, so scrolling up would give you a clue as to what’s happening. Additionally it looks like you’re trying to run a html file using node.

1 Like

#3

Hi, I am actually trying to use script within .html for quick testing purpose

0 Likes

#4

Node.js only runs JavaScript, it cannot interpret HTML. You would have to open the HTML in a browser (or serve the HTML via a local HTTP server that you connect to with your browser).

1 Like

#5

gotcha, thanks

0 Likes