`pnpm` out of the box?
pnpm gives drastically better performance than npm and would improve the developer experience, especially because of the large number of development dependencies this template uses. Thoughts?
Note that it doesn't currently work out of the box if you just try and use pnpm. Getting this error: https://github.com/pnpm/pnpm/issues/3275
Workaround that I'm using:
Make a .czrc file:
{
"path": "cz-conventional-changelog"
}
Remove relevant section from package.json:
"config": {
"commitizen": {
"path": "@commitlint/cz-commitlint"
}
},
Also set up a .npmrc like this, unsure if needed:
enable-pre-post-scripts=true
auto-install-peers=true
node-linker=hoisted
@aacitelli, Sure, I can give a try by creating a .czrc file and remove the relevant section in package.json.
If you want to contribute, I'm also open to PR.
Found another bump in the road - serverless-bundle only supports npm and yarn. Error still seems to happen with npm though, so maybe using pnpm for everything except the bundler during deploy is still possible. Will report back after a bit of debugging.
https://www.npmjs.com/package/serverless-bundle

EDIT: Error no longer occurs when removing this part of the serverless.yml:
externals:
- "@prisma/client"
copyFiles:
- from: "prisma/schema.prisma"
to: "./"
EDIT: As somewhat anticipated, Prisma crashes due to commenting out the above.
Looks like this is the actual culprit:
packagerOptions:
scripts:
- prisma generate && rimraf node_modules/@prisma/engines/** && rimraf node_modules/prisma/libquery_engine-[^rhel]* && prisma db push
Related info here https://github.com/AnomalyInnovations/serverless-bundle/issues/274
@ixartz Deployed with the above packagerOptions commented out and things are fixed all the way through. I'm happy to put together a PR with all of this, just want to check with you what those commands are actually doing, and if removing them is an issue. Prisma in my function is working fine, and I'm successfully making calls, so I'm a bit confused why that's necessary.
The above script is used when you deploy on production to migrate the Prisma schema. In local environment, the script is not used.
This weekend, I'll remove serverless-bundle and it should solve your problem.
@aacitelli I just migrate the project to serverless-esbuild from serverless-bundle. Hope it should solve your issue.
@ixartz Will get the chance to pull from upstream and give it a whirl early next week. Appreciate the update!
@aacitelli thank you for your help, let me know if you have any question.