[bug] build with Nextjs, error 'Uncaught SyntaxError: Unexpected template string' occurs
See original GitHub issueIs there an existing issue for this?
- I have searched the existing issues
Package Version
0.2.15
Current Behavior
Demo repo:
https://github.com/liran319/next-wagmi-demo
I have install wagmi@0.2.15
into my project with Nextjs, it works well when start project with ‘yarn dev’.
But Uncaught SyntaxError: Unexpected template string
occurs when run ‘yarn build && yarn start’.
It seems that only occurs on production mode.And there is no stack to debug. Could you please have a check?
Expected Behavior
Both development and production mode work well.
Steps To Reproduce
- Clone the repo
https://github.com/liran319/next-wagmi-demo
, and enter that folder; - Run
yarn
to install deps; - Run ‘yarn build && yarn start’
- check console, found ‘Uncaught SyntaxError: Unexpected template string’, and button doesn’t work
Link to Minimal Reproducible Example (CodeSandbox, StackBlitz, etc.)
No response
Anything else?
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:15 (6 by maintainers)
Top Results From Across the Web
[bug] build with Nextjs, error 'Uncaught SyntaxError ... - GitHub
But Uncaught SyntaxError: Unexpected template string occurs when run 'yarn build && yarn start'. image. It seems that only occurs on production ...
Read more >Why do I get an unexpected template string expression error?
This is an warning generated by ESLint: no-template-curly-in-string. Disallow template literal placeholder syntax in regular strings ...
Read more >react-hydration-error - Next.js
The first render is called Hydration which is a feature of React. This can cause the React tree to be out of sync...
Read more >Uncaught SyntaxError: Unexpected token < - JavaScript - iDiallo
This is a common error in JavaScript, and it is hard to understand at first why it happens. But if you bear with...
Read more >Node.js v19.3.0 Documentation
Indicates the failure of an assertion. All errors thrown by the node:assert module will be instances of the AssertionError class. new assert.AssertionError( ...
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
OH yes, it is! It works! But I think there is some where can be optimized and fixed on
wagmi
.Thanks you very much!
@liran319 this appears to be an issue with next’s SWC minification. You can add feedback to this discussion https://github.com/vercel/next.js/discussions/30237
the other issue brought up in the thread is related to es6 private fields. that is now fixed.