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.

Next.js - SyntaxError: Invalid or unexpected token

See original GitHub issue

Hi,

I have an issue with Next.js + useWallet setup. The error is next:

Снимок экрана 2022-04-25 в 18 07 45

My package.json file:

{
 "dependencies": {
    "next": "12.1.5",
    "react": "18.0.0",
    "react-dom": "18.0.0",
    "use-wallet": "0.13.6"
  },
}

As I managed to find out that the problem is in the pictures. I have downgraded to several previous versions. You can see the difference in the following links:

As I see from your commits, it was in these versions that pictures were added to the repository. I think this could be the reason.

Please, can you recommend something that I can do with it? Do I need the additional setup for Next.js to resolve it?

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:9
  • Comments:8

github_iconTop GitHub Comments

2reactions
tripplyonscommented, Jun 5, 2022

I’m running into this same issue with the latest version, and was able to resolve the issue by using the older version you suggested (0.13.4) by running npm i -s use-wallet@0.13.4.

0reactions
iquirinocommented, Aug 5, 2022

New PR to solve this issue: #229

Read more comments on GitHub >

github_iconTop Results From Across the Web

Next.js SyntaxError "Unexpected token 'export'" - Stack Overflow
I was getting the same error: Unexpected token 'export' ; with a node_modules dependency made for the browser (client-side).
Read more >
Invalid or unexpected token for styles import #12611 - GitHub
Describe the bug. I keep getting "Syntax Error: Invalid or unexpected token" whenever I import my scss stylesheet globally in _app.js.
Read more >
Fixing "SyntaxError: Unexpected token 'export'" with NextJS
Fixing “SyntaxError: Unexpected token ”export”” with NextJS. I ran into an error when trying to use reactgrid with NextJS. The error was
Read more >
[Solved] SyntaxError: Unexpected token '.' Jest Error for Next.js ...
This error could be caused by a number of issues and is related to Jest wanting to process CommonJS code. But it is...
Read more >
next js unexpected token export - You.com | The AI Search ...
The reason is that, by default, Next.js configs the babel-loader to only transpile the ES6 code in the src folder, any ES6 code...
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