以前工作但它停止了。如果我在app.js文件中崩溃了express应用程序,nodemon将首先重启,但是一旦app.listen()被执行,它将不会重新启动。我试图隔离app.js文件中的每个元素,但行为仍在继续。我最近也添加了一些包,我删除了它们,看它们是否引起了这种行为,但它仍然存在。
{
"name": "",
"version": "1.0.0",
"description": "",
"main": "app.js",
"scripts": {
"start": "node app"
},
"author": "",
"license": "ISC",
"dependencies": {
"bcryptjs": "^2.4.3",
"body-parser": "^1.18.2",
"compression": "^1.7.1",
"connect-flash": "^0.1.1",
"cookie-parser": "^1.4.3",
"cookie-session": "^2.0.0-beta.3",
"debug": "^3.1.0",
"ejs": "^2.5.7",
"express": "^4.16.2",
"express-session": "^1.15.6",
"express-validator": "^4.3.0",
"google-finance": "^0.1.10",
"gulp": "^3.9.1",
"mongoose": "^4.13.7",
"morgan": "^1.9.0",
"nodemon": "^1.14.11",
"passport": "^0.4.0",
"passport-facebook": "^2.1.1",
"passport-google-oauth20": "^1.0.0",
"passport-local": "^1.0.0",
"range": "0.0.3",
"round-to": "^2.0.0",
"serve-favicon": "^2.4.5",
"underscore": "^1.8.3"
}
}
答案 0 :(得分:1)
您确定使用nodemon
,因为start
命令应为:
"start": "nodemon app"