[英]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.