serverless-bundle
serverless-bundle copied to clipboard
Bundling issues after installing with `pnpm`
I am using https://github.com/AnomalyInnovations/serverless-typescript-starter
pnpm install
serverless offline start
Webpack complains of the missing:
"buffer-from": "^1.1.1",
"serverless-dotenv-plugin": "^3.0.0",
"source-map": "^0.7.3",
"source-map-support": "^0.5.19"
Which I added by hand in the package.json, then the basic example works.
Later on, I use prisma which loads a binary with the N-API, I get:
offline: GET /dev/hello (λ: hello)
Error ---------------------------------------------------
Error: ENOENT: no such file or directory, open '/home/millsp/Work/repros/prisma-serverless-local/.webpack/service/mappings.wasm'
This does not happen with yarn, and npm - it all works. pnpm has strict module isolation, the issue probably comes from there. Fixing that will probably fix it altogether, but let me know if you need a repro.