Magick
CDCloudflare Developers
•Created by Magick on 7/18/2024 in #pages-help
workers.api.error.script_not_found [code: 8000068]
Why would using a
server.js
file imply it would be long running?16 replies
CDCloudflare Developers
•Created by Magick on 7/18/2024 in #pages-help
workers.api.error.script_not_found [code: 8000068]
I've modified the
next.config.mjs
and now it produces a server.js
file, but still no index.html. I'm assuming the server file creates it dynamically.16 replies
CDCloudflare Developers
•Created by Magick on 7/18/2024 in #pages-help
workers.api.error.script_not_found [code: 8000068]
Even when I build and run locally there is no index.html.
16 replies
CDCloudflare Developers
•Created by Magick on 7/18/2024 in #pages-help
workers.api.error.script_not_found [code: 8000068]
I see the following:
16 replies
CDCloudflare Developers
•Created by Magick on 7/18/2024 in #pages-help
workers.api.error.script_not_found [code: 8000068]
Thanks @Erisa - its neither a static nor next-on-pages site. Just a normal Cloudflare pages site. There is no error on the page.
16 replies
CDCloudflare Developers
•Created by Magick on 7/14/2024 in #pages-help
Bun and Environment Variables - how?
Ok, that helps.
And the code on this issue also helps - https://github.com/elysiajs/elysia/issues/368
17 replies
CDCloudflare Developers
•Created by Magick on 7/14/2024 in #pages-help
Bun and Environment Variables - how?
To put it another way, Bun says it supports reading environment variables in the following ways:
Neither of these work. What does work in the CF Worker doesnt work in Bun locally.
17 replies
CDCloudflare Developers
•Created by Magick on 7/14/2024 in #pages-help
Bun and Environment Variables - how?
The example in one of your links is:
If I try to add this exact code I get an error of
Cannot find name ExportedHandler .
. There is no mention of where or how to import this.
If I try to use env.TEST_ENV
without importing bun then I get Cannot find name 'env'.
.17 replies
CDCloudflare Developers
•Created by Magick on 7/14/2024 in #pages-help
Bun and Environment Variables - how?
This is probably outside of your area, but if I need to use different syntax for environment variables in dev and when deployed, how best to handle these differences?
17 replies
CDCloudflare Developers
•Created by Magick on 7/14/2024 in #pages-help
Bun and Environment Variables - how?
Ok, this is very helpful. Thanks.
17 replies
CDCloudflare Developers
•Created by Magick on 7/14/2024 in #pages-help
Bun and Environment Variables - how?
These errors occur when running
wrangler deploy --minify src/index.ts
.
There is no explicit import of process
. Though my understanding of CF pages is that it isnt supported anyway, but I cannot see any documentation on what to use as an alternative.17 replies
CDCloudflare Developers
•Created by Magick on 7/12/2024 in #pages-help
Error: Dynamic require of "node:buffer" is not supported
I've found this is caused by using
import jwt from 'jsonwebtoken'
2 replies
CDCloudflare Developers
•Created by stibbs on 5/6/2024 in #pages-help
Are environment variables available at build or only runtime?
Have you tried platform.env?Is this is a filename or to be used in code? I've tried: -
import { VAR } from '$env/static/public'
- import.meta.env.VAR
- process.env.VAR
- platform.env.VAR
this results in ReferenceError [Error]: platform is not defined
.
None of them have worked.52 replies
CDCloudflare Developers
•Created by Magick on 7/2/2024 in #pages-help
Pages, Sveltekit and Environment variables
I've tried the following:
- process.env.VARIABLE
- import.meta.env.VARIABLE
Neither of these are working either.
7 replies
CDCloudflare Developers
•Created by Magick on 7/2/2024 in #pages-help
Pages, Sveltekit and Environment variables
Ok, I tried prefixing with
VITE_
and still get the same error.7 replies
CDCloudflare Developers
•Created by Magick on 7/2/2024 in #pages-help
Pages, Sveltekit and Environment variables
Sveltekit uses a different naming convention. It uses
PRIVATE
and PUBLIC
prefixes - https://kit.svelte.dev/docs/modules#$env-dynamic-private. And this is what I'm using. It works when I run the same build command locally.7 replies
CDCloudflare Developers
•Created by stibbs on 5/6/2024 in #pages-help
Are environment variables available at build or only runtime?
I've tried adding env vars to both the
wrangler.toml
and in the dashboard settings > environment variables, but neither works. I consistently get an error like [31mError[39m: Module '"$env/static/public"' has no exported member 'PUBLIC_SUPABASE_URL'.
52 replies