解决Vue2项目因为安装的依赖和node版本不一致导致的报错问题-1. 问题描述

时间:2024-04-03 11:35:43
ERROR Failed to compile with 27 errors 下午7:28:31
error in ./node_modules/quill/themes/bubble.js

Module parse failed: Unexpected token (12:18)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| }, 'blockquote']];
| class BubbleTooltip extends BaseTooltip {
> static TEMPLATE = ['<span class="ql-tooltip-arrow"></span>', '<div class="ql-tooltip-editor">', '<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">', '<a class="ql-close"></a>', '</div>'].join('');
| constructor(quill, bounds) {
| super(quill, bounds);

@ ./node_modules/quill/quill.js 30:0-45 72:19-30
@ ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Editor/index.vue?vue&type=script&lang=js
@ ./src/components/Editor/index.vue?vue&type=script&lang=js
@ ./src/components/Editor/index.vue
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://192.168.0.116:83&sockPath=/sockjs-node (webpack)/hot/dev-server.js ./src/main.js

上面是报错的一段信息,其中关键点在“quill”