cloudflare / workers-sdk

⛅️ Home to Wrangler, the CLI for Cloudflare Workers®
https://developers.cloudflare.com/workers/
Apache License 2.0
2.66k stars 694 forks source link

🐛 BUG: I am getting the __dirname uncaught refrence error ? #7027

Open Unknownmaster0 opened 5 days ago

Unknownmaster0 commented 5 days ago

Which Cloudflare product(s) does this pertain to?

Workers Runtime

What version(s) of the tool(s) are you using?

3.81.0

What version of Node are you using?

21.7.1

What operating system and version are you using?

windows 11

Describe the Bug

Observed behavior

Please describe. Uncaught ReferenceError: __dirname is not defined at null. [code: 10021]

Expected behavior

Please describe. backend/node_modules/@prisma/client/runtime/library.js:6:1410) at null. (index.js:13:638) at null.

Please provide a link to a minimal reproduction

No response

Please provide any relevant error logs

A request to the Cloudflare API (/accounts/6b04d8f8defb2010a12af27200ad7fe1/workers/scripts/medium-like-blog-backend/versions) failed.

Uncaught ReferenceError: __dirname is not defined at null. (backend/node_modules/@prisma/client/runtime/library.js:6:1410) at null. (index.js:13:638) at null. (backend/src/controllers/blog.controller.ts:2:45) [code: 10021]

penalosa commented 1 day ago

Thanks for reporting this! Would you be able to provide a reproduction repo that demonstrates the issue?