Nodemon 修改文件后只显示“restarting due to changes…“,而并没有重启服务器.

问题详情

使用nodemon index.js启动nodemon.
当修改文件后,nodemon只显示[nodemon] restarting due to changes....
并没有重新启动服务器,此时访问网络访问index.js仍然是旧版本.

类似下图情况
Nodemon 修改文件后只显示“restarting due to changes…“,而并没有重启服务器.

解决方案

Windows10系统下在path中添加以下环境变量(windows其他版本不确定可行性)
C:\Windows; C:\Windows\System32; C:\Windows\System32\wbem;[1]

引用目录

[1] https://*.com/questions/48546079/nodemon-stuck-at-restarting-due-to-changes-and-wont-restart-the-server