Failing to deploy backend (Next.js, Graphql, Prisma ORM) using Cloudfare worker [urgent]

I am trying to deploy the backend of my application using cloudfare worker, but I'm facing some issues while deploying. There were many issues before, but I managed to fix most of them, now the ones left are difficult to understand. Can anyone help me with this?
5 Replies
Walshy
Walshy•3mo ago
What's the issue?
Ashgreninja55555
Ashgreninja55555OP•3mo ago
this is my folder structure
No description
Ashgreninja55555
Ashgreninja55555OP•3mo ago
#:schema node_modules/wrangler/config-schema.json name = "newboard-db" main = "src/index.ts" compatibility_date = "2024-09-25" compatibility_flags = ["nodejs_compat"] [[d1_databases]] binding = "DB" # i.e. available in your Worker on env.DB database_name = "server-db" database_id = "2e156924-6a3c-4781-b319-bd5111894b77" this is my wrangler.toml
Ashgreninja55555
Ashgreninja55555OP•3mo ago
this is my src/index.ts file
Ashgreninja55555
Ashgreninja55555OP•3mo ago
when i try wrangler deploy [WARNING] Processing wrangler.toml configuration: - 😶 Ignored: "type": Most common features now work out of the box with wrangler, including modules, jsx, typescript, etc. If you need anything more, use a custom build. Total Upload: 14133.49 KiB / gzip: 2747.46 KiB Your worker has access to the following bindings: - D1 Databases: - DB: server-db (2e156924-6a3c-4781-b319-bd5111894b77) X [ERROR] A request to the Cloudflare API (/accounts/af309524202842efb35ff572f36f3397/workers/scripts/newboard-db/versions) failed. Uncaught TypeError: inherits4 is not a function at null.<anonymous> (file:///D:/Atomic/newboard-server/node_modules/http-errors/index.js:117:3) in createHttpErrorConstructor at null.<anonymous> (file:///D:/Atomic/newboard-server/node_modules/http-errors/index.js:27:28) in ../node_modules/http-errors/index.js at null.<anonymous> (index.js:19:51) in require2 at null.<anonymous> (file:///D:/Atomic/newboard-server/node_modules/send/index.js:15:19) in ../node_modules/send/index.js at null.<anonymous> (index.js:19:51) in require2 at null.<anonymous> (file:///D:/Atomic/newboard-server/node_modules/express/lib/utils.js:20:12) in ../node_modules/express/lib/utils.js at null.<anonymous> (index.js:19:51) in require2 at null.<anonymous> (file:///D:/Atomic/newboard-server/node_modules/express/lib/application.js:24:19) in ../node_modules/express/lib/application.js at null.<anonymous> (index.js:19:51) in require2 at null.<anonymous> (file:///D:/Atomic/newboard-server/node_modules/express/lib/express.js:18:13) in ../node_modules/express/lib/express.js [code: 10021] this occurs in the console @Walshy | Deploying it is a next.js backend app with graphql, apollo client and prisma ORM. @Walshy | Out of office Hello
Want results from more Discord servers?
Add your server