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

浙公网安备 33010602011771号