Questions tagged [cloudflare-pages]

82 questions
7
votes
1 answer

SvelteKit: Packages not being able to access node functions

I am building an app with SvelteKit and publishing it to Cloudflare Pages, but it is some packages I am using are not able to access node native functions. Here's the build log: 2022-07-30T19:05:14.200499Z > Using…
5
votes
1 answer

How to run SvelteKit & Cloudflare Page locally?

I'm trying to create a new app using SvelteKit & Cloudflare Pages and I'm struggling with running the application locally in a proper manner. Currently, in order to get the app running locally I run 2 scripts in 2 different terminals: vite build…
mccuna
  • 471
  • 7
  • 11
5
votes
3 answers

Nuxt3 deployment with Cloudflare pages failed

I have successfully compiled my nuxt3 project locally. But the deployment is not working with cloud flare page 00:14:35.140 Executing user command: npm run generate 00:14:35.613 00:14:35.613 > generate 00:14:35.613 > nuxt…
Thamizharasu
  • 301
  • 3
  • 13
5
votes
0 answers

WebPack cache file exceed file size limits when deploying NextJS app on CloudFlare Pages

I am trying to deploy my NextJS app on CloudFlare Pages. However I get an error during building application process: Error: Asset ".next/cache/webpack/client-production/0.pack" is over the 25MiB limit. Size: 38331968 bytes Here is my deployment…
Guix
  • 308
  • 2
  • 11
4
votes
0 answers

Cloudflare page NextJS environment variables not being read

I am hosting a NextJS site on cloudflare pages but I can't read the environment variables. Locally I am using in .env.local: NEXT_PUBLIC_API_URL=https://localhost:5001/ And reading it in code: const apiUrl = process.env.NEXT_PUBLIC_API_URL; It…
Guerrilla
  • 13,375
  • 31
  • 109
  • 210
4
votes
0 answers

Getting error Refused to execute script from 'path' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled

I am getting an error "Refused to execute script from 'https://emortech.pages.dev/mai emortech.pages.dev/:1n.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled." when I am trying running this deployed…
UHpi
  • 93
  • 1
  • 6
3
votes
1 answer

How do I use environment variables in a SvelteKit app hosted on Cloudflare Pages?

I am making a site for a very small organisation I am involved in, and have been asked to design it in a way where hosting costs virtually nothing. I have opted to use SvelteKit (hosted on Cloudflare Pages) and PocketBase (hosted on PocketHost).…
3
votes
1 answer

How can you create a Cloudflare Durable Object in a pages project

I have a Cloudflare Pages project (Built with Gatsby) that I wish to add a Durable Object to. Right now I can add workers by putting them into the functions directory of the project. Cloudflare's documentation indicates I should be able to add a…
major-mann
  • 2,602
  • 22
  • 37
3
votes
1 answer

How to ensure a Sveltekit project can actually run on Cloudflare workers?

Sveltekit and Cloudflare seem to be a great match. My objective is to deliver well-tested code, that runs smoothly on Cloudflare pages/workers. To do this, I use Cypress.io for e2e testing. The problem is that I can't trust the tests running…
DauleDK
  • 3,313
  • 11
  • 55
  • 98
2
votes
1 answer

Sveltekit app deployed on Cloudflare Pages causing error on refreshing page after initial load

While running SvelteKit app on CloudFlare Pages, it loads on the first request. When the page is refreshed then it throws an error. We are using axios in the load() function on Sveltekit to fetch data. The error in Cloudflare logs is adapter http…
Hellothere
  • 31
  • 2
2
votes
1 answer

Cloudflare and next.js static exports not working?

It normally works but suddenly it stoped working and im not sure why. If you can help thanks! logs 2022-11-24T13:14:56.98176Z Executing user command: next build && next export 2022-11-24T13:14:57.075259Z…
Struan Mclean
  • 111
  • 1
  • 3
2
votes
2 answers

Cloudflare Pages uses different sphinx version depending on commits and one is failing

I have a Cloudflare page that uses python-sphinxto build docs. For some of my commits, it downloads a different version of sphinx than others and fails to build docs correctly. What I tried: Adding a dummy commit on top of a failing build seems to…
2
votes
0 answers

Cloudflare pages proxy with basic auth

Is there a way to write a cloudflare rewrite/proxy similar to netlify as per https://docs.netlify.com/routing/redirects/rewrites-proxies/#proxy-to-another-service and adjust the header with basic auth credentials? For example I would need /api/* to…
waffl
  • 5,179
  • 10
  • 73
  • 123
2
votes
1 answer

@remix-run/node & Cloudflare page

I'm using cloudflare page template and I don't import @remix-run/node anywhere. Also package.json file doesn't involve @remix-run/node But after yarn install, @remix-run/node is created and when I try to compile then an error occurs. X [ERROR] Could…
2
votes
1 answer

Cloudflare Dashboard and Cloudflare Web Analytics show very different number of visits

I have a static website on Cloudflare Pages, for which Cloudflare Web Analytics is enabled. This is the only thing I am hosting on Cloudflare, and I set it up less than 24 hours ago. On the Cloudflare Dashboard, I see 403.96k visitors in the last 7…
黄雨伞
  • 1,904
  • 1
  • 16
  • 17
1
2 3 4 5 6