After installing my dependencies by runinning pnpm i and deploying succesfully by running sls deploy. My endpoints throw an internal error because the tree dependencies needed from the ones I explicitly installed, are not found. "Cannot find module 'chalk'\nRequire stack:\n-", for instance. Installing all of them is not viable. Any other option? Locally the NextJS works. It seems that running pnpm install should install all the child dependencies, but it doesn't. Cheers
My project: github.com/arcovoltaico/nextjs
To run the deployed project without a missing module error.
I think the only way to solve it, is instead of running npmp install
, choose pnpm install --shamefully-hoist
instead.