Deploy remix app
How do I deploy a built remix app to cloudflare pages? I know to create an app for pages I follow this https://developers.cloudflare.com/pages/framework-guides/deploy-a-remix-site/, but for an app that was built what do I need to add for it to run under Cloudflare pages?
I have tried
I have tried
npm install cloudflare@latest
, I created an app using the mentioned guide to compare the files, and add the @remix-run/cloudflare
dependencies along with updating the remix.config.js, adding the server.ts, etc... and I always ran npm install
after adding these, but nothing seems to work.
I saw the old post here, but when creating a remix app it doesn't ask for deployment target and I have my node as 18.0.0.
Here is the default config before adding any of this stuff:
Current:
14 Replies
Hey. I've deployed quite a few to production with Cloudflare, so I should be able to help.
You can create your remix app with this command
From there build the final output bundle using
npm run build
. Once that's done, you can deploy it with
Thanks for the reply! I deploy via git, but now all I am getting from Cloudflare is this.
I have deleted the project and recreated, but still get this each time.
Even with a blank template after running
npm run dev
and npm install
this happens.
I will give npm run build
a tryRight now deployments are a bit broken: https://www.cloudflarestatus.com/incidents/jvn13cvv64fw
When that is resolved you should be set to retry
Ah.. thanks! Here I am rebuilding over and over... and over... lol
This is Workers KV though? That pertain to pages?
Indeed, Pages uses KV under the hood for all the asset storage. There's a note on that incident as well
This issue can also lead to failures in Pages deployments.
Ah... I suppose I never learned to fully read, and just skim. My mistake. Appreciate it!
It seems to be getting better now though, I just had a deployment succeed. You could just wait it out though rather then keep retrying lol, when the status page is resolved you should be set
Yeah I am not trying any more. I will try later on when it isn't 2am 😉 Thanks again!
and now it's resolved, you have bad timing lol
It isn't just my timing. Welcome to my life.
@Leavii i'am on the same problem as you....
i have a existing project i want to deploy it in pages ..... what new dependencies and files i have to add for successful deployment ?
I just created a new project, moved my assets over to it, and where I had imports to @remix-run/react I just changed to @remix-run/cloudflare. I don't remember having to do much else honestly, but it was a small project I was using to test with anyway so I could use D1.