每当我的团队试图在node.js中实现某些东西时,就会发生什么,我们应该如何修复它? - 请注意,我们是节点新手
$ npm install express --save
SyntaxError: Unexpected identifier
at Object.exports.createScript (vm.js:24:10)
at REPLServer.defaultEval (repl.js:235:25)
at bound (domain.js:287:14)
at REPLServer.runBound [as eval] (domain.js:300:12)
at REPLServer.<anonymous> (repl.js:427:12)
at emitOne (events.js:95:20)
at REPLServer.emit (events.js:182:7)
at REPLServer.Interface._onLine (readline.js:211:10)
at REPLServer.Interface._line (readline.js:550:8)
at REPLServer.Interface._ttyWrite (readline.js:827:14)
你不应该在Node REPL中输入npm
命令。这是为了输入JavaScript。
直接在shell中输入npm
命令。
哦,你也不应该输入$
。这只代表常见的shell提示符。
只需输入命令提示符(cmd)即可。
npm install express --save