简体   繁体   English

nodejs 文件更改甚至不反映 nodemon 和主管

[英]nodejs file changes not reflecting even nodemon & supervisor

I have setup & run this project https://github.com/achowba/node-mysql-crud-app .我已经设置并运行了这个项目https://github.com/achowba/node-mysql-crud-app it is working fine but after changes in any file not reflecting at front end, always front output remain same as previous.它工作正常,但在任何文件中没有反映在前端的更改后,前端输出始终保持与以前相同。

Showing following output when nodemon app.js 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

My nodemon.json file我的 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"
}

My directory like following我的目录如下

在此处输入图片说明

I have tried also supervisor but same issue.我也试过supervisor但同样的问题。 hard cache clear also tried but no reflection.硬缓存清除也尝试过但没有反映。 please help what I can do now请帮助我现在可以做什么

Finally it is solved.终于解决了。 It was netbeans IDE issue.这是netbeans IDE 问题。 When I edit in notepad++ then change reflect but in netbeans not worked.当我在记事本++中编辑然后更改反射但在netbeans中不起作用。 Dont know why netbenas not worked.不知道为什么 netbenas 不起作用。 I have deleted & created again this project.我已经删除并重新创建了这个项目。 After that even not able to create new project in netbeans now for this project之后,现在甚至无法在 netbeans 中为此项目创建新项目

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM