我有一个网站和几个作为本地节点依赖项添加的外部模块(使用"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 脚本的新手,我不确定我在这里缺少什么。请建议。
更新:愚蠢的我,正在使用旧版本的并发。更新对问题进行了排序。