You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file
See original GitHub issueERROR Failed to compile with 2 errors 12:58:23
error in ./node_modules/pdfjs-dist/build/pdf.js
Module parse failed: Unexpected token (2413:45)
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
| intent: renderingIntent,
| renderInteractiveForms: renderInteractiveForms === true,
> annotationStorage: annotationStorage?.getAll() || null
| });
| }
@ ./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/views/sign/esign/AcEsign.vue?vue&type=script&lang=js& 122:0-41 493:6-17
@ ./src/views/sign/esign/AcEsign.vue?vue&type=script&lang=js&
@ ./src/views/sign/esign/AcEsign.vue
@ ./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/views/sign/Home.vue?vue&type=script&lang=js&
@ ./src/views/sign/Home.vue?vue&type=script&lang=js&
@ ./src/views/sign/Home.vue
@ ./src/router/index.js
@ ./src/js/core/init.js
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://192.168.43.252:8080&sockPath=/sockjs-node (webpack)/hot/dev-server.js ./src/main.js
error in ./node_modules/pdfjs-dist/web/pdf_viewer.js
Module parse failed: Unexpected token (895:20)
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
| this._on(eventName, listener, {
| external: true,
> once: options?.once
| });
| }
@ ./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/views/sign/esign/AcEsignViewer.vue?vue&type=script&lang=js& 23:0-64 97:28-36 110:30-39
@ ./src/views/sign/esign/AcEsignViewer.vue?vue&type=script&lang=js&
@ ./src/views/sign/esign/AcEsignViewer.vue
@ ./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/views/sign/esign/AcEsign.vue?vue&type=script&lang=js&
@ ./src/views/sign/esign/AcEsign.vue?vue&type=script&lang=js&
@ ./src/views/sign/esign/AcEsign.vue
@ ./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/views/sign/Home.vue?vue&type=script&lang=js&
@ ./src/views/sign/Home.vue?vue&type=script&lang=js&
@ ./src/views/sign/Home.vue
@ ./src/router/index.js
@ ./src/js/core/init.js
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://192.168.43.252:8080&sockPath=/sockjs-node (webpack)/hot/dev-server.js ./src/main.js
How can we resolve this issue??
Issue Analytics
- State:
- Created 2 years ago
- Comments:17 (1 by maintainers)
Top Results From Across the Web
"You may need an appropriate loader to handle this file type ...
Step-2: In order to compile JSX code to es5 babel provides @babel/preset-react package to convert react jsx extension file to native browser ...
Read more >You may need an appropriate loader to handle this file type ...
I 'm having a problem configuring Webpack for Typescript and React. ... file type currently no loaders are configured to process this file....
Read more >Module parse failed: Unexpected token. You may ... - GitHub
Module parse failed: Unexpected token. You may need an appropriate loader to handle this file type, currently no loaders are configured to process...
Read more >You may need an appropriate loader to handle ... - Laracasts
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. Hello,. I allow...
Read more >CSS : You may need an appropriate loader to handle this file ...
CSS : You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Unfortunately “Vue”, whatever that is, isn’t something that the PDF.js contributors can support. Furthermore, there’s not really any actionable information provided as-is; please note https://github.com/mozilla/pdf.js/blob/master/.github/CONTRIBUTING.md (emphasis mine):
You probably need to use the correct type of build then, as explained at https://www.npmjs.com/package/pdfjs-dist/v/2.7.570?activeTab=readme
Since this is the first search result for the error message and the solution isn’t in the thread…
Symptom: The following error message shows up when you build.
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file
Cause: your build configuration does not support option chaining. Likely something with webpack or babel.
Solution 1: the quick fix is to use the
legacy
build folder.Solution 2: Change your webpack configuration to support option chaining by installing
@babel/preset-env
or following the instructions in the comments earlier in this thread.