vue 中 eslint 與 webstorm格式化 報錯


 

參考: https://blog.csdn.net/weixin_37219302/article/details/79685351

 

在.eslintrc.js中修改成:

// required to lint *.vue files
plugins: [
'vue',
// 此插件用來識別.html 和 .vue文件中的js代碼
'html'
],

 

報錯: Module build failed: Error: Failed to load plugin html: Cannot find module 'eslint-plugin-html'


運行

npm install eslint-plugin-html --save-dev

即可解決

Module build failed: Error: Cannot find module ‘file-loader’

運行 npm install file-loader –save-dev即可解決

這里的file-loader就是你cannot find module ‘XXXXX’

就是你缺少啥插件你安裝就行了。

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM