[英]nodejs, npm script not running
因此,我試圖使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"
}
}
解決了,要運行具有自定義名稱的腳本(例如“ test-watch”),您必須執行npm run test-watch
。 不是npm test-watch
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.