Leavii
Leavii
CDCloudflare Developers
Created by Leavii on 1/21/2024 in #pages-help
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 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:
"@remix-run/cloudflare": "^2.5.0",
"@remix-run/cloudflare-pages": "^2.5.0",
"@remix-run/cloudflare": "^2.5.0",
"@remix-run/cloudflare-pages": "^2.5.0",
Current:
{
"name": "my-project",
"private": true,
"sideEffects": false,
"scripts": {
"build": "remix build",
"dev": "remix dev --manual",
"lint": "eslint --ignore-path .gitignore --cache --cache-location ./node_modules/.cache/eslint .",
"start": "remix-serve build",
"typecheck": "tsc"
},
"dependencies": {
"@remix-run/node": "^2.5.0",
"@remix-run/react": "^2.5.0",
"@remix-run/serve": "^2.5.0",
"isbot": "^4.1.0",
"match-sorter": "^6.3.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"sort-by": "^0.0.2",
"tiny-invariant": "^1.3.1"
},
"devDependencies": {
"@remix-run/dev": "^2.5.0",
"@types/react": "^18.2.20",
"@types/react-dom": "^18.2.7",
"@typescript-eslint/eslint-plugin": "^6.13.0",
"@typescript-eslint/parser": "^6.13.0",
"eslint": "^8.47.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"typescript": "^5.1.6"
},
"engines": {
"node": ">=18.0.0"
}
}
{
"name": "my-project",
"private": true,
"sideEffects": false,
"scripts": {
"build": "remix build",
"dev": "remix dev --manual",
"lint": "eslint --ignore-path .gitignore --cache --cache-location ./node_modules/.cache/eslint .",
"start": "remix-serve build",
"typecheck": "tsc"
},
"dependencies": {
"@remix-run/node": "^2.5.0",
"@remix-run/react": "^2.5.0",
"@remix-run/serve": "^2.5.0",
"isbot": "^4.1.0",
"match-sorter": "^6.3.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"sort-by": "^0.0.2",
"tiny-invariant": "^1.3.1"
},
"devDependencies": {
"@remix-run/dev": "^2.5.0",
"@types/react": "^18.2.20",
"@types/react-dom": "^18.2.7",
"@typescript-eslint/eslint-plugin": "^6.13.0",
"@typescript-eslint/parser": "^6.13.0",
"eslint": "^8.47.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"typescript": "^5.1.6"
},
"engines": {
"node": ">=18.0.0"
}
}
18 replies