简体   繁体   中英

Node js Uncaught SyntaxError: Unexpected identifier

When I call node filename.js then it return an error.(Uncaught SyntaxError: Unexpected identifier).

在此处输入图片说明

How can I fix it?

Thanks

键入node ,您处于 node 命令模式,您应该使用Ctrl + C退出,您只需要在终端中使用node jsfile.js运行您的 js 文件,而不是在 node 命令模式下运行。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM