-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug] build with Nextjs, error 'Uncaught SyntaxError: Unexpected template string' occurs #211
Comments
OH yes, it is! It works! Thanks you very much! |
Spent some time looking into it. Seems related to the |
Maybe related: I just upgraded to My |
What version of JavaScript are you targeting? (If you are using TypeScript, it's the |
Also on Next (12.1.0), using In this case the message I get is: I've tried going back a few versions (0.2.13 and 0.2.10) because it sounded like this worked for people on Next in the past, but same result there. |
@cnasc I just upgraded the wagmi docs site to |
Hi there, https://github.com/liran319/next-wagmi-demo/blob/main/tsconfig.json |
🤔 odd. Tried Will have to dig deeper into the Next side of things to figure it out I think |
@liran319 can you try with the latest version |
On my end, |
Mine still breaks on Safari (version 14.1.2). It fails on this Webkit line https://github.com/WebKit/webkit/blob/main/Source/JavaScriptCore/parser/Parser.cpp#L3039 Exact error:
My set up: "wagmi": {
"version": "0.2.22",
"resolved": "https://registry.npmjs.org/wagmi/-/wagmi-0.2.22.tgz",
"integrity": "sha512-WtpRO/JGTIrcs9vBdIJZe...",
"requires": {
"@ethersproject/providers": "^5.5.1",
"@walletconnect/ethereum-provider": "1.7.5",
"wagmi-core": "0.1.16",
"walletlink": "^2.5.0"
}
}, Note: If I remove WalletConnect from my config, it works. new WalletConnectConnector({
options: {
infuraId,
qrcode: true,
},
}), |
@csadai can you try now? |
@liran319 this appears to be an issue with next's SWC minification. You can add feedback to this discussion vercel/next.js#30237 the other issue brought up in the thread is related to es6 private fields. that is now fixed. |
This issue has been locked since it has been closed for more than 14 days. If you found a concrete bug or regression related to it, please open a new bug report with a reproduction against the latest wagmi version. If you have any other comments you can create a new discussion. |
Is there an existing issue for this?
Package Version
0.2.15
Current Behavior
Demo repo:
https://github.com/liran319/next-wagmi-demo
I have install
[email protected]
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
https://github.com/liran319/next-wagmi-demo
, and enter that folder;yarn
to install deps;Link to Minimal Reproducible Example (CodeSandbox, StackBlitz, etc.)
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: