【发布时间】:2022-01-13 03:17:10
【问题描述】:
我知道,我必须更改我的 package.json 文件,但我不明白怎么做。 我尝试在 package.json 脚本中使用“watch”,但它不起作用。 请帮我。我刚开始学习 Angular 和 NodeJs。 对不起我的英语不好和简单的问题。 现在我总是用 nodemon index.js 重新加载我的服务器并且有问题: enter image description here
"dependencies": {
"body-parser": "^1.19.0",
"cors": "^2.8.5",
"express": "^4.17.1",
"mysql2": "^2.3.3",
"node": "^17.1.0"
},
"name": "server",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"description": "",
"devDependencies": {
"nodemon": "^2.0.15"
}
}
【问题讨论】: