問題描述
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