因此,我试图使npm test-watch正常工作,因此它会自动重新启动我的脚本,但是由于某种原因,它找不到命令
{
"name": "node-test",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "mocha **/*.test.js",
"test-watch": "nodemon --exec \"npm test\"" ------ this
},
"author": "",
"license": "ISC",
"devDependencies": {
"mocha": "^3.0.0"
},
"dependencies": {
"robotjs": "^0.5.1"
}
}
答案 0 :(得分:1)
已解决,要运行具有自定义名称的脚本(如“ test-watch”),您必须执行npm run test-watch
。不是npm test-watch