Skip to content
This repository has been archived by the owner on Jan 25, 2023. It is now read-only.

feat: support pnpm #449

Closed
wants to merge 1 commit into from
Closed

feat: support pnpm #449

wants to merge 1 commit into from

Conversation

jcayzac
Copy link

@jcayzac jcayzac commented Jul 14, 2020

Fixes #447

@jcayzac jcayzac requested a review from a team as a code owner July 14, 2020 10:15
run-build-functions.sh Outdated Show resolved Hide resolved
@ehmicky
Copy link
Contributor

ehmicky commented Jul 14, 2020

Thanks a lot for this PR @jcayzac!

@jcayzac
Copy link
Author

jcayzac commented Jul 14, 2020

@ehmicky what repo got the source of https://docs.netlify.com/configure-builds/manage-dependencies/ ? The docs also need a PR

@ehmicky
Copy link
Contributor

ehmicky commented Jul 14, 2020

Good catch @jcayzac! The docs are a private repository.
Putting @verythorough and @klavavej in the loop since they are working on the documentation website.

run-build-functions.sh Outdated Show resolved Hide resolved
@ehmicky
Copy link
Contributor

ehmicky commented Jul 14, 2020

For the record, it appears that very few Netlify users are using pnpm: only 13 accounts in the last 7 days.

@jcayzac
Copy link
Author

jcayzac commented Jul 14, 2020

For the record, it appears that very few Netlify users are using pnpm: only 13 accounts in the last 7 days.

Maybe because Netlify doesn't support it? Out of curiosity, how did you collect that number?
My PNPM deploys for instance have no package.json and use Makefiles, to avoid any automatic install with npm/yarn.

@antfu
Copy link

antfu commented Jul 17, 2020

Come from this thread and I am using pnpm as well. Would love to see pnpm get supported by Netlify!

BTW, netlify/cli#550 seems to only merge with the Girdsome changes but not for pnpm as its title says. I guess we can bring back these changes netlify/cli@131bd5e once we make this PR merged and working.

@erquhart
Copy link

@jcayzac I have a bit of bad news - we're going to ask that you take a different route for using pnpm on Netlify. I do realize this PR was invited, but on further consideration, there's some concern around the added complexity of natively supporting an additional package manager, a support effort that doesn't end with the initial implementation.

What we would rather see is a route by which users of various tools like pnpm can self implement. We've played with supporting homebrew as one option for this (which we plan to revisit), and build plugins may be another.

Current recommendation would be to utilize the approach outlined in the community post, which is known to be effective for production use cases.

All of that said, we do want to keep the discussion open toward a solution, but I expect that solution will likely be through a build plugin. Build plugins don't quite have all of the capabilities necessary to fully support pnpm, but @ehmicky may have some ideas.

Conversation to continue in netlify/build#1633.

@jcayzac
Copy link
Author

jcayzac commented Jul 30, 2020

@erquhart

What we would rather see is a route by which users of various tools like pnpm can self implement.

This would actually be easy if the run build script didn't "get in the way", i.e. if we could disable it entirely so that e.g. npm doesn't run when we have a package.json.

@jcayzac jcayzac deleted the feature/pnpm branch July 30, 2020 12:13
@mcmxcdev
Copy link

mcmxcdev commented Sep 6, 2021

There are like 3 main players in the dependency management ecosystem now, so I cannot understand the reasoning for "added complexity" above.

Both npm and yarn are not viable alternatives for us, so this is a big disappointment.

Hacky workarounds might work for a while, but then again, already encountering issues to due non-straightforward support of pnpm: opennextjs/opennextjs-netlify#219

Maybe this decision can be reconsidered as pnpm steadily increases its user base.

@ZetiMente
Copy link

ZetiMente commented Oct 13, 2021

@jcayzac I have a bit of bad news - we're going to ask that you take a different route for using pnpm on Netlify. I do realize this PR was invited, but on further consideration, there's some concern around the added complexity of natively supporting an additional package manager, a support effort that doesn't end with the initial implementation.

What we would rather see is a route by which users of various tools like pnpm can self implement. We've played with supporting homebrew as one option for this (which we plan to revisit), and build plugins may be another.

Current recommendation would be to utilize the approach outlined in the community post, which is known to be effective for production use cases.

All of that said, we do want to keep the discussion open toward a solution, but I expect that solution will likely be through a build plugin. Build plugins don't quite have all of the capabilities necessary to fully support pnpm, but @ehmicky may have some ideas.

Conversation to continue in netlify/build#1633.

pnpm has emerged as even more popular than yarn. Has Netlify changed their mind yet? Like I can use npm but its just way slower than pnpm. And pnpm is practically required for large monorepos. Tis a shame.

@jwarby
Copy link

jwarby commented Oct 18, 2021

Just to add to the discussion - we're trying to have a go at switching from Yarn Classic + Lerna to pnpm and we're getting stuck with Netlify builds too. The workaround in the community post doesn't work for us as we have a Netlify build plugin that comes from a private package, and the Netlify build will fail if this plugin is not installed before the build process kicks off proper. This means we will have to let Netlify install dependencies first, then we'll have to cleanup and re-install using pnpm which is a big waste of resources and adds further complexity to our processes which we'd rather avoid.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: Add PNPM support
7 participants