老师,这里打包报错是什么原因呢
来源:1-4 项目上线和课程总结
设计转前端zy
2022-06-15 13:19:08
> jingdong@0.1.0 build > vue-cli-service build All browser targets in the browserslist configuration have supported ES module. Therefore we don't build two separate bundles for differential loading. ⠹ Building for production... ERROR Failed to compile with 1 error 13:17:15 C:\Users\钟彦\Desktop\jingdong\src\components\Docker.vue 21:9 error Component name "Docker" should always be multi-word vue/multi-word-component-names C:\Users\钟彦\Desktop\jingdong\src\components\Toast.vue 1:1 error Component name "Toast" should always be multi-word vue/multi-word-component-names ✖ 2 problems (2 errors, 0 warnings) You may use special comments to disable some warnings. Use // eslint-disable-next-line to ignore the next line. Use /* eslint-disable */ to ignore all warnings in a file. ERROR Error: Build failed with errors. Error: Build failed with errors. at C:\Users\钟彦\Desktop\jingdong\node_modules\@vue\cli-service\lib\commands\build\index.js:207:23 at C:\Users\钟彦\Desktop\jingdong\node_modules\webpack\lib\webpack.js:148:8 at C:\Users\钟彦\Desktop\jingdong\node_modules\webpack\lib\HookWebpackError.js:68:3 at Hook.eval [as callAsync] (eval at create (C:\Users\钟彦\Desktop\jingdong\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:6:1) at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (C:\Users\钟彦\Desktop\jingdong\node_modules\tapable\lib\Hook.js:18:14) at Cache.shutdown (C:\Users\钟彦\Desktop\jingdong\node_modules\webpack\lib\Cache.js:150:23) at C:\Users\钟彦\Desktop\jingdong\node_modules\webpack\lib\Compiler.js:1225:15 at Hook.eval [as callAsync] (eval at create (C:\Users\钟彦\Desktop\jingdong\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:6:1) at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (C:\Users\钟彦\Desktop\jingdong\node_modules\tapable\lib\Hook.js:18:14) at Compiler.close (C:\Users\钟彦\Desktop\jingdong\node_modules\webpack\lib\Compiler.js:1218:23) PS C:\Users\钟彦\Desktop\jingdong>
1回答
好帮手慕慕子
2022-06-15
同学你好,根据粘贴的信息,可知是eslint的问题,规定了组件的名称格式,要写成多词的格式,不是能单个词。
可以在设置eslint的规则下将报错信息中,显示的规则设置为0,关闭该项校验,如下:
祝学习愉快~
相似问题