我已经设置并运行此项目https://github.com/achowba/node-mysql-crud-app。它工作正常,但是在任何文件的更改未反映在前端之后,始终前端输出与以前相同。
[nodemon app.js
时显示以下输出
C:\xampp\htdocs\node-mysql-crud-app>nodemon app.js
[nodemon] 2.0.2
[nodemon] reading config .\nodemon.json
[nodemon] to restart at any time, enter `rs`
[nodemon] or send SIGHUP to 5896 to restart
[nodemon] ignoring: .\.git/**/* node_modules/**/node_modules
[nodemon] watching dir(s): app.js routes\**\* views\**\*
[nodemon] watching extensions: js,json,ejs
[nodemon] bind restart -> `osascript -e 'display notification "App restarted due to:
'$FILENAME'" with title "nodemon"'`
[nodemon] starting `node app.js`
[nodemon] forking
[nodemon] child pid: 1692
[nodemon] watching 7 files
Server running on port: 2000
Connected to database
我的nodemon.json文件
{
"restartable": "rs",
"ignore": [
".git",
"node_modules/**/node_modules"
],
"verbose": true,
"execMap": {
"js": "node"
},
"events": {
"restart": "osascript -e 'display notification \"App restarted due to:\n'$FILENAME'\" with title \"nodemon\"'"
},
"watch": [
"app.js",
"routes/",
"views/"
],
"env": {
"NODE_ENV": "development"
},
"ext": "js,json,ejs"
}
我的目录如下
我也尝试过supervisor
,但问题相同。硬缓存清除也尝试过但没有反映。请帮助我现在可以做的事情
最后解决。这是netbeans IDE的问题。当我在notepad ++中编辑时,更改反射但在netbeans中不起作用。不知道为什么netbenas无法正常工作。我已经删除并再次创建了这个项目。之后,现在甚至无法在netbeans中为此项目创建新项目]