Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webpack Module parse failed: Unexpected token #543

Closed
srcker opened this issue May 29, 2024 · 1 comment
Closed

Webpack Module parse failed: Unexpected token #543

srcker opened this issue May 29, 2024 · 1 comment

Comments

@srcker
Copy link

srcker commented May 29, 2024

Describe the issue


 error  in ./node_modules/md-editor-v3/lib/es/MdEditor.mjs

Module parse failed: Unexpected token (1300:38)
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
|     const { lines } = view.state.doc;
|     let start = 1;
>     let end = startLinesCalc.shift() ?? lines;
|     for (let i = 1; i <= lines; i++) {
|       if (i === end) {

 @ ./node_modules/md-editor-v3/lib/es/index.mjs 1:0-53 10:0-26:2
 @ ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader-v16/dist??ref--1-1!./src/view/chat/index.vue?vue&type=script&lang=js
 @ ./src/view/chat/index.vue?vue&type=script&lang=js
 @ ./src/view/chat/index.vue
 @ ./src/routes.js
 @ ./src/main.js
 @ multi (webpack)-dev-server/client?http://192.168.1.164:8081&sockPath=/sockjs-node (webpack)/hot/dev-server.js ./src/main.js

 error  in ./node_modules/md-editor-v3/node_modules/lru-cache/dist/commonjs/index.js

Module parse failed: Unexpected token (27:15)
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
|     //@ts-ignore
|     AS = class AbortSignal {
>         onabort;
|         _onabort = [];
|         reason;

 @ ./node_modules/md-editor-v3/lib/es/chunks/index.mjs 12:0-37 132:27-35
 @ ./node_modules/md-editor-v3/lib/es/index.mjs
 @ ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader-v16/dist??ref--1-1!./src/view/chat/index.vue?vue&type=script&lang=js
 @ ./src/view/chat/index.vue?vue&type=script&lang=js
 @ ./src/view/chat/index.vue
 @ ./src/routes.js
 @ ./src/main.js
 @ multi (webpack)-dev-server/client?http://192.168.1.164:8081&sockPath=/sockjs-node (webpack)/hot/dev-server.js ./src/main.js

Procedure version

4.15.6

Reproduction link

No response

@imzbf
Copy link
Owner

imzbf commented May 29, 2024

错误上提示你需要相应的loader,处理??之类的语法吧,好像babel需要7以上

@imzbf imzbf changed the title 报错了 什么原因 Webpack Module parse failed: Unexpected token May 29, 2024
@imzbf imzbf closed this as completed May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants