-
Notifications
You must be signed in to change notification settings - Fork 127
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]: SyntaxError while building an app with @clerk/nextjs
npm package
#270
Comments
Hi @bharatari thank you very much for the issue 🙂 (and for the reproduction! it's always extremely helpful having one! 🙏) The syntax error you're experiencing is a silly bug present in the beta package that I recently introduced, sorry for the inconvenience 😓, #272 fixes that You can try the prerelease package to see if things work fine for you with that anyways I did run your app locally, now the build succeeds but it but I guess that could be expected because I haven't set a Clerk key? (sorry I am not familiar with Clerk 😓) Please give the prerelease a try and let me know if everything there works as you'd expect it to 🙏 |
Hi @dario-piotrowicz, thank you so much for the quick fix! Just tried it out locally and the build succeeds with the prerelease. The error you're seeing locally is expected because you don't have a Clerk key but I seem to be seeing a different error on my end when running locally with
|
Not seeing this issue when I deploy, so this might just be an issue with my local environment, especially given it worked for you locally as well. |
Hey there, are you using wrangler@2 locally, by any chance? If so, that could explain the issue - please just double-check for me that you are using wrangler@3 🙂 If that doesn't seem to be the problem, please could you also check that you're providing the necessary env variables to wrangler too - someone else experienced a similar issue when they weren't. |
Ah that was it, I was on |
Awesome 😄 Glad that all is working as expected now @bharatari 😃 I'm closing this issue as it should hopefully be all ok now, if you still have problems feel free to reopen it or open a new one 🙂 |
next-on-pages environment related information
System:
Platform: linux
Arch: x64
Version: #1 SMP Fri Jan 27 02:56:13 UTC 2023
CPU: (12) x64 12th Gen Intel(R) Core(TM) i7-1255U
Memory: 8 GB
Shell: /bin/bash
Binaries:
Node: 18.15.0
Yarn: 1.22.19
npm: 9.5.0
pnpm: 8.3.1
Package Manager Used: npm
Relevant Packages:
@cloudflare/next-on-pages: 0.0.0-97c8739 (beta/canary release)
vercel: N/A
next: 13.4.3
Description
Building a Next.js app with the
@clerk/nextjs
npm package causes a SyntaxError during the build process:This app runs properly locally with
next dev
and builds properly withnext build
, which suggests it's not an issue with@clerk/nextjs
itself (I apologize in advance if this is not an issue on thenext-on-pages
end).This example fails on the stable version of
next-on-pages
with awasm
import error, which is why I'm running against the beta version. Wanted to mention that in case this has something to do withwasm
support.Reproduction
Here is a repo that demonstrates the issue: https://github.com/bharatari/build-error-repro. I generated the app via
create-next-app
, addedexport const runtime = "edge";
toapp/page.tsx
and then simply added amiddleware.ts
file that imports the@clerk/nextjs
package.Pages Deployment Method
None
Pages Deployment ID
No response
Additional Information
No response
Would you like to help?
The text was updated successfully, but these errors were encountered: