-
Notifications
You must be signed in to change notification settings - Fork 332
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
Module parse failed: Unexpected token You may need an appropriate loader to handle this file type. #607
Comments
We're facing the exact same issue. It seems to have happened very recently. In our case we're using the "v-tooltip": "^2.0.2" version. |
Your webpack config seems to be misconfigured. There's nothing wrong with the JS in v-tooltip.esm.js |
Thank you @Akryum . |
@tiagocostafdm that is exactly what i wanted to know |
we are facing the same issue as well. we are using ^2.1.1. on our case, this happened after we upgrade node into version 14.15.3. |
Made some changes to the babel plugin so it transpile vue script code with babel :| |
Still weird that your webpack setup can't handle standard modern js 🤔 |
fixed, by manually include v-tooltip to use babel-loader in webpack config. in our case we are still using vue 2.5.x. |
@tukangdezain can share some more details how you did it |
@ddevopsrepos For a VUE 2 project generated through VUE CLI fixed the issue by adding
under rules section in file |
Hi Can you please help us to fix this issue
npm run watch
10% building modules 3/3 modules 0 active
Webpack is watching the files…
95% emitting
ERROR Failed to compile with 1 errors 11:40:14 AM
error in ./node_modules/v-tooltip/dist/v-tooltip.esm.js
Module parse failed: Unexpected token (1493:10)
You may need an appropriate loader to handle this file type.
| if (!this.popperInstance) {
| const popperOptions = {
| ...this.popperOptions,
| placement: this.placement,
| };
@ ./resources/client/assets/js/app.js 101:0-33
@ multi ./resources/client/assets/js/app.js
Asset Size Chunks Chunk Names
fonts/vendor/element-ui/lib/theme-chalk/element-icons.ttf?732389ded34cb9c52dd88271f1345af9 56 kB [emitted]
fonts/vendor/element-ui/lib/theme-chalk/element-icons.woff?535877f50039c0cb49a6196a5b7517cd 28.2 kB [emitted]
/client/js/app.js 12.1 MB 0 [emitted] [big] /client/js/app
/client/js/vendor.js 1.75 MB 1 [emitted] [big] /client/js/vendor
/js/app.js 224 kB 2 [emitted] /js/app
/client/js/manifest.js 3.84 kB 3 [emitted] /client/js/manifest
/css/app.css 219 kB 2 [emitted] /js/app
/client/css/app.css 8.86 kB 2, 2 [emitted] /js/app, /js/app
ERROR in ./node_modules/v-tooltip/dist/v-tooltip.esm.js
Module parse failed: Unexpected token (1493:10)
You may need an appropriate loader to handle this file type.
| if (!this.popperInstance) {
| const popperOptions = {
| ...this.popperOptions,
| placement: this.placement,
| };
@ ./resources/client/assets/js/app.js 101:0-33
@ multi ./resources/client/assets/js/app.js
The text was updated successfully, but these errors were encountered: