Next.js - SyntaxError: Invalid or unexpected token
See original GitHub issueHi,
I have an issue with Next.js + useWallet setup. The error is next:
![Снимок экрана 2022-04-25 в 18 07 45](https://user-images.githubusercontent.com/17030797/165119825-db6ed7b1-434d-4fee-be75-a34c5b374174.png)
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:
- Created a year ago
- Reactions:9
- Comments:8
Top 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 >
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 Free
Top 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
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
.New PR to solve this issue: #229