[英]changes in views of index.pug file are not reloading live or after refresh using nodemon while running in node.js in Windows 10
我搜索了此问题,但是此答案无法解决我的问题。
每当我在app.js中进行更改时,它们都不会在浏览器中看到。 nodemon不起作用,它只是在终端显示输出,因为[nodemon] restarting due to changes..
而[nodemon] restarting due to changes..
但不是“实际上”刷新。
我使用npm start
启动我的app.js,并且启动脚本是"start": "nodemon -e js, pug"
,即使当我手动运行nodemon app.js
时,也只有它不会自动和动态刷新。
我正在从MongoDB提取数据,并使用过猫鼬。
当我通过CTRL+C
和npm start
停止nodemon而不是热重装时,app.js可以完美地工作。
我的模板engine-pug.js是这个问题吗?
删除空间,您应该运行nodemon -e js,pug
因为nodemon使用空格来解析参数,因此它将扩展名视为“ js”,而不是“ js and pug”。
这应该够了吧。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.