nodemon应用程序崩溃时运行此“npm运行testing手表”

在我的package.json文件中,我编写了这个运行nodemon:
"scripts": { "test": "mocha server/**/*.test.js", "test-watch": "nodemon --exec 'npm test'" },这个错误在terminal显示:

 > node-todo-api@1.0.0 test-watch D:\nodepractice\node-todo-api > nodemon --exec 'npm test' [nodemon] 1.12.0 [nodemon] to restart at any time, enter `rs` [nodemon] watching: *.* [nodemon] starting `'npm test'` ''npm' is not recognized as an internal or external command, operable program or batch file. [nodemon] app crashed - waiting for file changes before starting... 

如何解决这个问题,我想用nodemon。

为什么不用双引号引出来呢?

试试这个方法:

 "test-watch":"nodemon --exec \"npm test\""