You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
corepack not installed by default with Homebrew #55366
Homebrew team member @cho-m recommends usage of Homebrew to install Corepack separately with brew install corepack (which would mean the version number is managed by Homebrew). An exception is made for old versions such as node@20, node@18, etc, where the --without-corepack is not present
Homebrew is compiling Node.js without corepack, hence it not being installed. That's certainly not an issue with Node.js, no?
It's an issue with the Node.js Download docs, which recommend installing via Homebrew in two divergent ways:
brew install node@22: corepack not installed
brew install node@20 and older: corepack installed
This divergent behavior is a pretty confusing situation for users who are following official Node.js documentation.
If Node.js wants to support Homebrew, and Homebrew has divergent behavior, then the Node.js Download page should add an additional command for the latest Node.js version (so that Corepack is also installed there):
+brew install corepack
Looks like a new PR should be done over here, in case Homebrew does not accept the issue below (which is likely, given historical responses to this issue):
If Node.js wants to support Homebrew, and Homebrew has divergent behavior, then the Node.js Download page should add an additional command for the latest Node.js version (so that Corepack is also installed there):
+brew install corepack
Looks like a new PR should be done over here, in case Homebrew does not accept the issue below (which is likely, given historical responses to this issue):
Activity
karlhorky commentedon Oct 12, 2024
Further Background
After doing a bit of research in the Homebrew repository, I can see the following:
--without-corepackflag in thenode.rbFormulabrew install corepack(which would mean the version number is managed by Homebrew). An exception is made for old versions such asnode@20,node@18, etc, where the--without-corepackis not presentcorepacknot installed with formulanodeHomebrew/homebrew-core#151439 (comment)node@22:corepacknot installednode@20and older:corepackinstalled--without-corepackflag was first added in a PR for Node.js 17.3.0, involved Homebrew members @chenrui333 @carlocab @SMillerDev @bevanjkayMaybe this should instead be considered a bug in the Homebrew formula? (at least, from the perspective of the Node.js team).
If I can get confirmation that this is considered a bug from the Node.js team, I will report a new separate issue in the Homebrew repository.
avivkeller commentedon Oct 12, 2024
Homebrew is compiling Node.js without corepack, hence it not being installed. That's certainly not an issue with Node.js, no?
Report issues with the homebrew binary to homebrew.
karlhorky commentedon Oct 12, 2024
It's an issue with the Node.js Download docs, which recommend installing via Homebrew in two divergent ways:
This divergent behavior is a pretty confusing situation for users who are following official Node.js documentation.
If Node.js wants to support Homebrew, and Homebrew has divergent behavior, then the Node.js Download page should add an additional command for the latest Node.js version (so that Corepack is also installed there):
+brew install corepackLooks like a new PR should be done over here, in case Homebrew does not accept the issue below (which is likely, given historical responses to this issue):
https://github.com/nodejs/nodejs.org/blob/3c0635cfcbdc667b3e7daae5f2bedf1e58a7d486/apps/site/util/getNodeDownloadSnippet.ts#L69-L83
Makes sense, reported again here:
corepackinstalled withnode@20but not withnode@22Homebrew/homebrew-core#193982karlhorky commentedon Oct 12, 2024
Since this was a pretty small PR, I opened it here:
brew install corepackfor current / pending releases nodejs.org#7120