首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >运行开始:开发失败在并发中意外标识符

运行开始:开发失败在并发中意外标识符
EN

Stack Overflow用户
提问于 2019-07-25 07:17:04
回答 2查看 241关注 0票数 0

我对nodejs世界很陌生,在一些基础知识上有困难,

当我安装npm时,它会显示一些警告消息,但是完成它。

当我建立npm的时候,效果很好

但是,当我运行start:dev时,它会崩溃,其中包含以下错误消息:

代码语言:javascript
运行
复制
concurrently\bin\concurrently.js:140
let lastColor;
^^^^^^^^^
SyntaxError: Unexpected identifier
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3

npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "start:dev"
npm ERR! node v0.12.2
npm ERR! npm  v2.7.4
npm ERR! code ELIFECYCLE
npm ERR! izi-backend@0.0.1 start:dev: `concurrently --handle-input "wait-on dist/main.js && nodemon" "tsc -w -p tsconfig.build.json" `
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the izi-backend@0.0.1 start:dev script 'concurrently --handle-input "wait-on dist/main.js && nodemon" "tsc -w -p tsconfig.build.json" '.
npm ERR! This is most likely a problem with the izi-backend package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     concurrently --handle-input "wait-on dist/main.js && nodemon" "tsc -w -p tsconfig.build.json"
npm ERR! You can get their info via:
npm ERR!     npm owner ls izi-backend
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\dev\iziMobile\izi-server\npm-debug.log

npm运行启动:dev定义为:

代码语言:javascript
运行
复制
"start:dev": "concurrently --handle-input \"wait-on dist/main.js && nodemon\" \"tsc -w -p tsconfig.build.json\" "

还打印出npm-调试器。日志:

如果它以ok 1详细的cli 'C:\Program (X86)\nodejs\node.exe结束,一个详细的cli 'C:\Program x86 1详细的cli 'run',使用npm@2.7.4 3 info使用node@v0.12.2 4详细的节点符号链接C:\Program (x86)\nodejs\node.exe 5详细运行脚本'prestart:dev','start:dev',‘'poststart:dev’6 info prestart:dev izi-backend@0.0.1 7 info start:dev izi-后端@0.0.1 8详细不安全-perm在生命周期中真正的9 info izi-后端@0.0.1无法执行启动:dev脚本10详细堆栈错误:izi-后端@0.0.1启动:dev:concurrently --handle-input "wait-on dist/main.js && nodemon" "tsc -w -p tsconfig.build.json" 10详细堆栈退出状态1 10 EventEmitter详细堆栈。(C:\Program (x86)\nodejs\node_modules\npm\lib\utils\lifecycle.js:213:16) 10 EventEmitter.emit详细堆栈(events.js:110:17) 10详细堆栈位于ChildProcess。(C:\ (x86)\nodejs\node_modules\npm\lib\utils\spawn.js:14:12)文件ChildProcess.emit 10详细堆栈(events.js:110:17) 10详细堆栈在maybeClose (child_process.js:1015:16) 10详细堆栈在Process.ChildProcess._handle.onexit (child_process.js:1087:5) 11详细pkgid izi-后端@0.0.1 12详细cwd C:\dev\iziMobile\izi-服务器13 error Windows_NT 6.3.9600 14 error argv "C:\Program (x86)\nodejs\node.exe“"C:\Program (X86)\nodejs\ node _ code \ npm \bin\npm-cli.js”启动“运行”15错误节点v0.12.2 16 error npm v2.7.4 17错误代码ELIFECYCLE 18 error izi-后端@0.0.1启动:dev:concurrently --handle-input "wait-on dist/main.js && nodemon" "tsc -w -p tsconfig.build.json" 18错误退出状态1 19错误在izi-后端@0.0.1开始处失败:dev脚本‘并发--句柄-输入-等待-on dist/main.js && nodemon“tsc -w -p tsconfig.build.json”。19错误这很可能是izi后端包的问题,19错误不是npm本身的问题。19错误告诉作者,这在您的系统上失败了: 19错误并发-句柄输入“等待-在dist/main.js & nodemon”"tsc -w -p tsconfig.build.json“19错误,您可以通过: 19 error npm所有者ls izi-后端19错误获得他们的信息,上面可能会有额外的日志输出。20详细退出1,true <

并发是我在packages.json中使用的包,所以我怀疑是否真的存在错误.

我有遗漏什么吗?在这一点上任何帮助都可以。

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2019-07-25 07:20:42

节点v0.12.2不支持let声明。

有关完整版本支持矩阵,请参见这里

票数 1
EN

Stack Overflow用户

发布于 2019-07-25 07:20:18

您正在使用节点版本v0.12.2。不支持let语法。

node.green中可以看到,Node v6.4.x支持let

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/57196311

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档