最新消息: 电脑我帮您提供丰富的电脑知识,编程学习,软件下载,win7系统下载。

Node.js错误,关于它的一切真的

IT培训 admin 6浏览 0评论

Node.js错误,关于它的一切真的

每当我的团队试图在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提示符。

Node.js错误,关于它的一切真的

每当我的团队试图在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提示符。

与本文相关的文章

发布评论

评论列表 (0)

  1. 暂无评论