I use corepack with pnpm, which allows me not to worry about installing / updating versions, and using engines for that:
But corepack doesn’t seem to work, as I simply get an error that pnpm version is mismatched…
npm install -g pnpm to the start of build command to update
pnpm. If you need a specific version, you can do
npm install -g pnpm@<version>.
If you already have several commands to build your application, add a
render-build.sh to your app containing something like:
npm install -g pnpm
./render-build.sh as your build command.
Render Support, UTC+10
I’ve actually managed to find a better way to do it, as I have tried both a script and using nom to install pnpm. The issue was that static sites have automatic installation of dependencies, so I couldn’t even get to the build command without a failure due to the engine settings.
So I first had to set
true to disable automatic installation. After that what I originally wanted to do - use corepack, worked without issue. I just had to then set this in the build command:
corepack enable; pnpm install; pnpm build;
My suggestion is to make it more obvious int he documentation about the automatic installation of dependencies, as it took me quite a bit of time before I stumbled on that option
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.