Should corepack be installed by default?

Asked by Jonathan Lindsey

Hello, hopefully I'm in the right place on the internet. Please kindly point me in the right direction if I'm not.

The yarn documentation says corepack is shipped with "all Node.js releases starting from 16.10" but installing nodejs and then running `corepack enable` does not work as documented. Instead I get a command not found error.

https://yarnpkg.com/getting-started/install

I submitted a bug report/question in the yarnpkg GitHub and then created a PR to amend the documentation with an exception for package managers that don't include corepack. But in the PR I was told:

>This seems like something that should be fixed upstream in your systems package manager; if it doesn't include the binaries that Node.js ships then that seems like a bug on their end.

https://github.com/yarnpkg/berry/discussions/5060

https://github.com/yarnpkg/berry/pull/5063

So my question here is what is the intended behavior? Should nodejs include corepack (though disabled) or not include it?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu nodejs Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

Remark: Only Ubuntu kinetic and lunar (development version) have Node.js >=16.10

From the build log of nodejs 18.12.1+dfsg-2ubuntu1 in Ubuntu lunar
https://launchpadlibrarian.net/634102460/buildlog_ubuntu-lunar-amd64.nodejs_18.12.1+dfsg-2ubuntu1_BUILDING.txt.gz

./configure --verbose --without-npm --without-corepack ...

As far as I can see, this has been inherited from Debian, see debian/rules in http://deb.debian.org/debian/pool/main/n/nodejs/nodejs_18.12.1+dfsg-2.debian.tar.xz

DEB_CONFIGURE_EXTRA_FLAGS = \
--verbose \
--without-npm \
--without-corepack ...

I do not know the background.

If you think that corepack (and eventually npm) should be enabled in the packages provided by Debian and Ubuntu, then I suggest that you create bug reports in the Debian bug tracker and in the Ubuntu bug tracker.

Can you help with this problem?

Provide an answer of your own, or ask Jonathan Lindsey for more information if necessary.

To post a message you must log in.