-
Notifications
You must be signed in to change notification settings - Fork 297
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
Could not run @clerk/remix on CloudFlare Workers. Cannot use 'import.meta' outside a module Syntax Error #952
Comments
@dimkl Thanks for adding the label and self-assigning this issue. Since you labelled it as 'remix-issue' I would also like to investigate the Cloudlfare Wranger/Miniflare which could also potentially create issues. Thank you for your support. !! |
Hi @aerojeyenth. Thank you for reporting this. I would be very nice to also provide feedback about About the label: the use of |
|
This issue is related to remix-run adding HMR and Hot Data Revalidation and was introduced in version I downgraded remix packages to Related issue in remix: remix-run/remix#5644 |
Closing this ticket as it depends on remix issue: remix-run/remix#5644 |
@dimkl Thank you so much for helping me out on this! It was very quick. Big thanks! |
Package + Version
@clerk/clerk-js
@clerk/clerk-react
@clerk/nextjs
@clerk/remix
@clerk/types
@clerk/themes
@clerk/localizations
@clerk/clerk-expo
@clerk/backend
@clerk/clerk-sdk-node
@clerk/shared
@clerk/fastify
gatsby-plugin-clerk
build/tooling/chore
Version:
Browser/OS
macOS Big Sur
Description
Hi great people at Clerk. I am super impressed with what Clerk is doing. I want to use it in my next application. We are building a job board in Remix and hosting on Cloudflare Workers. After following the documents I made sure that Clerk/Remix supports all the edge env including CF workers but when I tried to build the app using Miniflare(Wrangler 2.12.3) locally by following the steps in the official documentation, I got the following error at the 2nd step of Wrapping the App with ClearkApp.
SyntaxError: Cannot use 'import.meta' outside a module
interestingly the failure occurs only after the Build succeeded not sure if this is the problem of Miniflare/Wrangler or Remix or Clerk/Remix packages. I kindly request you to help me debug this. Thanks a lot.
### Steps to reproduce:
Please clone the repo to local machine into a local folder using
git clone https://github.com/aerojeyenth/demo-for-cf-error
run
npm install
after npm install is compete
run
npm run dev
Actual Behaviour:
npm run command fails with the following error:
SyntaxError: Cannot use 'import.meta' outside a module
Expected Behaviour:
npm run command should run without any errors and the remix application should run locally.
The text was updated successfully, but these errors were encountered: