vue項目npm run serve啟動后修改代碼報錯Failed to compile with 1 errors


 

問題描述

npm run serve啟動項目后,修改代碼,項目會自動重新編譯,但是eslint會報錯。
修改的內容:
import {Vue} from "vue-property-decorator"的vue重新復制粘貼了一次。

問題出現的平台版本及自己嘗試過哪些方法

系統:win10
工具: vscode
項目用的 vue ui圖形界面自動創建的
嘗試過的方法:ctrl+c強制結束然后等一會兒在npm run serve才好

相關代碼

錯誤提示:

ERROR  Failed to compile with 1 errors 14:03:51 error in ./src/components/login/Login.vue Module Error (from ./node_modules/eslint-loader/index.js): ✖ 24 problems (3 errors, 21 warnings) 3 errors and 21 warnings potentially fixable with the `--fix` option. @ ./src/router/index.ts 5:0-49 14:13-18 @ ./src/main.ts @ multi (webpack)-dev-server/client?http://192.168.124.4:8080/sockjs-node (webpack)/hot/dev-server.js ./src/main.ts Type checking in progress... No type errors found Version: typescript 3.7.5 Time: 1111ms

···回復:

修改 vue.config.js

module.exports = { lintOnSave: false,

默認是 true,改為 false


免責聲明!

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



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