无法在使用Typescript构建的节点项目中运行Nodemon(在Windows中)

问题描述 投票:5回答:1

Node项目是用Typescript构建的,package.json文件中有三个脚本,但是当我运行它时显示...

如果我在ubuntu中运行此项目,则可以正常运行,但不能在windows中运行

Image of output terminal

但是在此nodemon之后仍未开始运行项目。

Package.json中的脚本

"start": "tsc --watch & nodemon dist/index.js",
"lint": "tslint -c tslint.json 'src/**/*.ts' --fix",
"build": "tsc"

帮助我解决这个问题,预先谢谢您:)

node.js typescript server build nodemon
1个回答
5
投票

您似乎缺少&tsc --watch之间的nodemon dist/index.js字符。单个&不是有效的and运算符:

© www.soinside.com 2019 - 2024. All rights reserved.