【发布时间】:2016-11-21 07:54:07
【问题描述】:
我有一个网站和几个作为本地节点依赖项添加的外部模块(使用"file:...")。
为了更新我网站中的外部模块引用,我使用如下 npm 脚本:
"scripts": {
"preupdate-own-deps":"concurrently \"cd ../my-ext-module1 && gulp build\" \"cd ../my-ext-module2 && gulp build\"",
"update-own-deps": "rimraf node_modules/my-ext-* && npm install --save"
}
每当我在终端运行concurrently "cd ../my-ext-module1 && gulp build" "cd ../my-ext-module2 && gulp build" 时,一切都很好。但是每当使用npm run update-own-deps 运行相同的操作时,preupdate-own-deps 就会退出并出现以下错误:
[0] The system cannot find the path specified.
[1] The system cannot find the path specified.
[1] cd ../my-ext-module2 && gulp build exited with code 1
[0] cd ../my-ext-module1 && gulp build exited with code 1
由于我是 npm 脚本的新手,我不确定我在这里缺少什么。请提出建议。
更新:愚蠢的我,正在使用旧版本的并发。更新解决了问题。
【问题讨论】:
标签: node.js npm-scripts