Closed gregavola closed 1 month ago
Hey @gregavola could you please report your issue at https://github.com/cloudflare/workerd/discussions/categories/npm-package-requests instead.
It would be helpful to add a repo with the failing project.
Thanks
(I closed the report because this is related to worked rather than specific to next)
I'm using Prisma as defined here, and I am able to run
npm run dev
have it working locally to serve content.Once I run
npm run build:worker && wrangler deploy
- everything builds, but I get this error:[ERROR] Could not resolve "pg-cloudflare"
The module "./dist/index.js" was not found on the file system:
You can mark the path "pg-cloudflare" as external to exclude it from the bundle, which will remove this error. You can also surround this "require" call with a try/catch block to handle this failure at run-time instead of bundle-time.
✘ [ERROR] Build failed with 2 errors:
.worker-next/.next/standalone/node_modules/.prisma/client/default.js:1:30: ERROR: Could not resolve "#main-entry-point" .worker-next/.next/standalone/node_modules/pg/lib/stream.js:41:41: ERROR: Could not resolve "pg-cloudflare"