-
Notifications
You must be signed in to change notification settings - Fork 126
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
[shopify-app-remix] [cloudflare] deployment fails #1031
Comments
This issue exists because of the version of @paulomarg - this is not a |
Same problem here - I am not deploying on cloudflare but local test development |
Also same issue on local test development. @bkspace If I've understand your explaination, it does not work well just because the last version of @shopify/app (3.58.2) still uses esbuild 0.19.8? |
@bkspace Maybe Try overriding the version by adding to your package.json "resolutions": { Then re-generate the package lock file and deploy, that did the trick for me |
@OlivierNguyen - specifically wrangler uses @devil1991 - Nice! We didn't go down that path because there are issues with upgrading wrangler to newer esbuild (have been following their attempts/issues). If it works, it works, but for the time being we're happy with just patching out the |
We're labeling this issue as stale because there hasn't been any activity on it for 60 days. While the issue will stay open and we hope to resolve it, this helps us prioritize community requests. You can add a comment to remove the label if it's still relevant, and we can re-evaluate it. |
Issue summary
Before opening this issue, I have:
@shopify/*
package and version:{ logger: { level: LogSeverity.Debug } }
in my configuration, when applicableDeployment to Cloudflare Pages fails when compiling worker with:
Expected ";" but found "with"
->/node_modules/@shopify/shopify-app-remix/dist/esm/react/components/AppProvider/AppProvider.mjs:3:59:
Expected behavior
Deployment of a Shopify application to Cloudflare pages should succeed.
Actual behavior
What actually happens?
Steps to reproduce the problem
In order to get this package to deploy to cloudflare:
1.) Refactor
shopify.server.ts
to usecloudflare ctx
instead ofprocess.env
to get environment variables.2.) Swap out
@remix-run/node
for@remix-run/cloudflare
3.) Update
entry.server.tsx
to be compatible with cloudflare (If I remember correctly4.) use
cloudflareDevProxyVitePlugin as remixCloudflareDevProxy
invite.config.ts
5.) A couple of other small tweaks
I'm happy to setup as base level repository if that would make life simpler.
npx wrangler pages deploy --project-name=foo /build/client
As a temporary fix, we are using the CJS export ofAppProvider
(i.econst { AppProvider} = require("@shopify/shopify-app-remix/react");
^ this does not actually work.
Have also posted this in the CF discord to get opinions on where the issue may lie :)
Debug logs
The text was updated successfully, but these errors were encountered: