use pnpm as package manager#1557
Conversation
thet
left a comment
There was a problem hiding this comment.
Looks good, but a detail about npx pnpm.
| export | ||
|
|
||
| YARN ?= npx yarn | ||
| PNPM = pnpm |
There was a problem hiding this comment.
I wonder if we should use npx pnpm here.... Because that way it's sure it's installed, as everone has a Node environment available.
There was a problem hiding this comment.
A common way to handle this in the Node ecosystem is with corepack: https://pnpm.io/installation#using-corepack
npx pnpm would not guarantee that you are using a particular version of pnpm.
There was a problem hiding this comment.
I switched barceloneta to pnpm a while ago and used corepack there. See https://github.com/plone/plonetheme.barceloneta/blob/master/HOWTO_DEVELOP.md ... this is also used in the plone developer docs https://6.docs.plone.org/install/create-project-cookieplone.html#node-js ... I'd recommend to use corepack here too and update the README accordingly.
There was a problem hiding this comment.
Okay, didn't know corepack. Nice. Then no problem!
I have ./node_modules/.bin (and other paths) in my PATH, so I don't activate environments, normally.
| // } | ||
| // XXX: this doesn't work. currently, webpack configuration needs "shamefully-hoist=true" | ||
| // which creates a flat node_modules directory. | ||
| // see this comment for a possible solution: https://github.com/webpack/webpack/issues/5087#issuecomment-3193480986 |
There was a problem hiding this comment.
Hm. Okay. But no problem I guess...
There was a problem hiding this comment.
I also think its not a problem. Packages are just not that efficiently symlinked like pnpm would do normally.
|
I did some updates on this PR:
I tried the command
|
|
hrm. a test is failing. |
This looks OK to me, but I always follow the plone docs for prerequisites here: https://6.docs.plone.org/install/create-project-cookieplone.html#node-js they do |
|
In the plone docs I've also read that in recent Node.JS environments corepack is already included. I have updated a draft PR for the docs update here: plone/documentation#2069 Also, once we have updated @patternslib/dev and co we could remove the Makefile customizations which I added in my recent commit. |
|
The re-running the GHA fixed it. |
|
Regarding corepack - I'm confused: It was added to the Node distribution in v14 and v16 but removed again in v25? |
|
Regarding the corepack confusion. Not a problem that corepack was removed from Node again. The corepack package manager manager is installed as recommended - via the npm package manager. |
|
When you put it like that, it does sound a little silly. :) |
|
Let's merge and see what happens. |


Uh oh!
There was an error while loading. Please reload this page.