node.js - console.log() reports errors when running with node
習慣沉默
習慣沉默 2017-06-05 11:13:18
0
2
740

Created a app.js file with the following content:

var msg = 'Hello World'; 
console.log(msg);   

Run the file using node on the command line, and the error will be as follows:

Usedvs code, the debugging interface outputs normally.

I have been using webstorm before, and it seems that there will be no such problem.

習慣沉默
習慣沉默

reply all(2)
阿神

Is this what you said?

This error is that there is no app.js file in your app directory

Peter_Zhu

When opening the command line tool, do not enter the node environment, switch directly to the directory and enter node app.js. Don’t enter node first

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!