question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Module parse failed - webpack

See original GitHub issue

Describe the bug

I cannot get the latest module to work, is there something I need to do for this to work with webpack?

react | ERROR in ./node_modules/@web3modal/react/dist/index.js 125:25
react | Module parse failed: Unexpected token (125:25)
react | File was processed with these loaders:
react |  * ./node_modules/babel-loader/lib/index.js
react | You may need an additional loader to handle the result of these loaders.
react | |         h(!1), s(!0);
react | |         try {
react | >           v = await r(O ?? t), P.isNull(v) || (g(v), H(void 0), s(!1));
react | |         } catch (Y) {
react | |           Y instanceof Error ? H(Y) : H(new Error("Unknown error")), g(void 0), s(!1);
react | ℹ 「wdm」: Failed to compile.

SDK Version

  • Version 2.0.0-alpha.8

To Reproduce Steps to reproduce the behavior:

  1. Run sample project with defaults

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
0xAsimetriqcommented, Oct 25, 2022

You need to configure webpack / babel to work with ES2020 standard (this is what we are targeting). I believe webpack is complaining about that optional chaining operator ??

0reactions
paintoshicommented, Dec 22, 2022

@0xAsimetriq I wonder if that’s possible without ejecting the whole thing, which we probably won’t do since it’s a one-way operation.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Module parse failed: Unexpected token - Stack Overflow
Apparently it happened because you have two module properties in the webpack config object. Given JS objects can only hold one value per...
Read more >
Module parse failed: Unexpected token. You may ... - GitHub
This code snippet is for webpack.config I believe instead of babel.config ... Module parse failed: Unexpected token (1:7) File was processed with these ......
Read more >
module parse failed: unexpected token (1:0) you may need an ...
1 Answer. Sorted by: 7. Apparently it happened because you have two module properties in the webpack config object. Given JS objects can...
Read more >
039;t build with webpack - Material Design for Bootstrap
css 1:0 Module parse failed: Unexpected character '@' (1:0) You may need an appropriate loader to handle this file type, currently no loaders...
Read more >
Odyssey Lift-off I: "Module parse failed: Unexpected token" Error
Module parse failed: Unexpected token (43:10) You may need an appropriate loader to handle this file type. Looks like webpack is unhappy for ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found