标签: javascript node.js
我是node.js的新手,我的代码未执行。无论我在哪里搜索,我都意识到代码具有正确的语法。 当我直接在终端上运行此代码时,它正在执行,但是当我创建一个名为hello.js的文件然后执行时,它给了我error。代码和错误分别如下:
console.log('hello world');
投掷:
node hello.js SyntaxError: Unexpected identifier