Node项目的构建是以 手稿 在package.json文件中有三个脚本,但当我运行时,它显示... ...
如果我把这个项目运行在 ubuntu 它工作正常,但不是在 窗口
但在这之后,nodemon并没有开始运行项目。
包裹.json中的脚本
"start": "tsc --watch & nodemon dist/index.js",
"lint": "tslint -c tslint.json 'src/**/*.ts' --fix",
"build": "tsc"
帮我解决这个问题,先谢谢你:)
你似乎缺少一个 &
间字 tsc --watch
和 nodemon dist/index.js
. 单一 &
是无效的 and
运营商。
"start": "tsc --watch && nodemon dist/index.js",
更新 看来问题出在Windows上。通常这个问题可以通过使用concurrently或cross-env等库来解决,在Windows上以类似的方式执行命令。在你安装了concurrently之后。
"start": "concurrently \"tsc --watch\" \"nodemon dist/index.js\"",
希望能帮到你