lettucebaran
Explore posts from serversCDCloudflare Developers
•Created by lettucebaran on 7/21/2024 in #pages-help
An unknown error occured. Contact your account team or Cloudflare support: https://cfl.re/3WgEyrH.
Background
I made changes to my Next.js project. I found out which lines cause the script to throw an error, but I don't understand why. So, I am blind trying to navigate on an unknown path.
My deployment command is:
Problem
The error I receive after trying running the deployment command:
Environment
Account ID:
10588302399247a4add0cce49f3d28ee
Question
1. How can I see the error in detail? Because this generic error
2. Could someone please help me in general related to this error, because I am extremely confused and frustrated. I received this error maybe 20 times today. At this point, I have to commit 1 function and re-run the deployment to see if it will throw an error. It takes ages to make any progress.12 replies
DTDrizzle Team
•Created by lettucebaran on 7/20/2024 in #help
Can't alter column from `.notNull()` to `allow null`
Background
I have an SQLite db, and a schema.
I edited my schema to:
Aim
Assuming the business logic is correct, I aimed to migrate my database with
drizzle-kit generate
and <apply migration script>.
Problem
However, after running the generate script, no migration was generated. How can I make C1 allow NULL
values?
Environment
Related SEO tags so others can find the problem and the solution quicker: NOT NULL constraint failed4 replies
CDCloudflare Developers
•Created by lettucebaran on 7/19/2024 in #pages-help
A request to the Cloudflare API failed
Background
To deploy the project, I build it with
pnpm next-on-pages
, and then deploy it with wrangler pages deploy
.
Issue
When I run the deploy command, then the script throws an error:
I used to deploy projects a few days ago, but now I can't. How may I start deploying again?
Environment
3 replies
CDCloudflare Developers
•Created by lettucebaran on 6/15/2024 in #general-help
Fetching R2 blob on the client-side (skipping server)
I uploaded a file using the
PutObjectCommand
method. It's a public file. I want to access this file on the client-side (by skipping the server). So, I thought of getting the file by fetching the URL, but I don't know the file's URL.
Would you recommend this approach to get the image URL?
- If so, how can I get/construct the URL?
- If not, what would you recommend doing instead?
E.g., https://<some_value>.r2.com/path/to/file
?12 replies
DTDrizzle Team
•Created by lettucebaran on 6/4/2024 in #help
Type error when inserting
Aim
insert row to
contactInformationTable
My attempt
7 replies
DTDrizzle Team
•Created by lettucebaran on 5/20/2024 in #help
`drizzle-kit studio` is unable to launch D1 db (prod, remote)
Steps to reproduce:
1. Clone https://github.com/cjxe/nextjs-d1-drizzle-cloudflare-pages
2. Follow
README.md
.
3. Run pnpm db:studio:local
. Verify that viewing the local d1 db is fine.
4. Run pnpm db:studio:prod
. Verify that drizzle-kit is unable to view the d1 prod remote db.
Error:
📁 drizzle.config.ts
: https://github.com/cjxe/nextjs-d1-drizzle-cloudflare-pages/blob/main/drizzle.config.ts2 replies
CDCloudflare Developers
•Created by lettucebaran on 5/20/2024 in #pages-help
How can I access `env.DB` in my Pages/Worker on production?
Steps to reproduce:
1. Clone https://github.com/cjxe/nextjs-d1-drizzle-cloudflare-pages
2. Follow
README.md
.
3. Run pnpm start
or pnpm pages:prod
.
4. Launch the web app using your favourite browser.
Error:
I don't get this error when I run on dev
due to how next.config.mjs
is set up, but I can't make this work on production. The main issue is the Cloudflare pages return an error when it tries running getRequestContext().env.DB
in src/server/db/index.ts
.41 replies
CDCloudflare Developers
•Created by lettucebaran on 5/17/2024 in #pages-help
Loading different env variables with Nextjs and next-on-pages
Aim
I want to call Cloudflare env variables such as:
Problem
When I run
npx @cloudflare/next-on-pages@1
, the Vercel build fails with the following error:
So, that makes me think that my configuration is broken.
I am happy to create .env
files, but I want to avoid duplicate data entry (e.g., settings the both env variable in .env.dev
and wrangler.toml
).2 replies
CDCloudflare Developers
•Created by lettucebaran on 5/16/2024 in #pages-help
How to read error logs for "This deployment failed" by myself?
For example
https://33aa7d0d.e303-dijital-kartvizit-2.pages.dev
failed. I want to read the logs without having to go through the support team to increase my speed of analysing the problem. How can I do that?7 replies