netlify / build

Netlify Build (node process) runs the build command, Build Plugins and bundles Netlify Functions. Can be run in Buildbot or locally using Netlify CLI
https://docs.netlify.com/configure-builds/build-plugins/
MIT License
217 stars 55 forks source link

Automatically detect pnpm version #5663

Open benmccann opened 4 months ago

benmccann commented 4 months ago

Which problem is this feature request solving?

Netlify uses pnpm 7 by default. If your project is using pnpm 8 or pnpm 9 then the deployment will fail unless you manually specify the packageManager field. With pnpm 9, specifying the packageManager field will then in turn cause difficulties with running the project locally for users who are not using corepack (https://github.com/pnpm/pnpm/issues/8087)

Describe the solution you'd like

Look at the lockfile version to choose a compatible version of pnpm without the user needing to manually specify it in the packageManager field just as Vercel does.

Pull request (optional)

Skn0tt commented 4 months ago

Yes, that sounds like something we should implement. I've surfaced this internally.