1,require子產品時不提示require方法:
解決:
File > Settings > Languages & Frameworks > Node.js and NPM 中,勾選Coding assistance for Node.js
![](https://img.laitimes.com/img/9ZDMuAjOiMmIsIjOiQnIsIyZuBnL4YzN3EzMyIDMx0SM3MDO0kjM5EjNyATM4EDMy0SNycDM2MTMvwFMxgTMwIzLcVjM3AjNzEzLcd2bsJ2Lc12bj5ycn9Gbi52YugTMwIzZtl2Lc9CX6MHc0RHaiojIsJye.png)
2,報錯:app.use() requires a middleware function.
解決:
路由處理時未導出 > module.exports = router;
3,報錯:No default engine was specified and no extension was provided.
解決:
路口檔案設定模闆引擎有誤 > app.set('view engine','art');
轉載于:https://www.cnblogs.com/qingl/p/9858330.html