![](/img/trans.png)
[英]nodemon app crashed - waiting for file changes before starting… nodejs
[英]nodejs file changes not reflecting even nodemon & supervisor
我已經設置並運行了這個項目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 問題。 當我在記事本++中編輯然后更改反射但在netbeans中不起作用。 不知道為什么 netbenas 不起作用。 我已經刪除並重新創建了這個項目。 之后,現在甚至無法在 netbeans 中為此項目創建新項目
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.