-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
node corepack is broken (yarn, pnpm, ...) #253
Comments
Anything not directly managed by Hermit shouldn't be checked in. This is conceptually similar to using Usually though, we set an environment variable to tell package managers to install into |
Looking at the list of envars, it doesn't seem like there is one to set the install prefix, but it can be done via:
We can probably do this in an |
This is a little bit scary, as sometimes these changes can cause unexpected effects, but it seems useful. Will install into .hermit/node/bin Fixes #253
The linked PR is a proof of concept but we should not merge this, as corepack is very explicitly marked experimental:
|
I'm going to close this, as generally Hermit is not in the business of doing anything other than installing the base toolchain. Anything beyond that, such as npm, pip, etc. needs to be managed by the user. |
@alecthomas Many thanks for giving me a pointer. Will try that suggestion locally and see if I can come up with a fix. |
We verify the downloaded install script's SHA-256 value against a known checksum in `bin/hermit`. This ensures the integrity of the installer when bootstrapping hermit. We version (via file name suffix) the install script by the script's short hash value, so that an install script can be uniquely identified by its version / file name. The corresponding `bin/hermit` is generated with `hermit init` for a project. Note that an install script's "version" is unrelated to the version of the hermit executable.
We'll revisit this later. Revert "fix: use the right installer URL for the canary channel (cashapp#257)" This reverts commit f4b87be. Revert "fix: publish versioned installer script to canary" This reverts commit 8b40b96. Revert "feat: verify installer checksum when bootstrapping (cashapp#253)" This reverts commit 4802074.
The preferred way to install tools like
yarn
andpnpm
is through NodeJScorepack
command:For projects using
hermit
, this can be done via:hermit install node corepack enable
Which adds new symlinks to the
./bin
directory, likeyarn
,yarnpkg
,pnpm
, andpnpx
. And now I can just invoke them usingyarn install
as usual, which is great for local development!However, these symlinks are added relative to my local Hermit folder (MacOS laptop):
ls -la ./bin/yarn ./bin/yarn -> ../../../Library/Caches/hermit/pkg/node-19.2.0/lib/node_modules/corepack/dist/yarn.js
Which means it is broken if I try to use it in CI (ubuntu), or check it into the repository so that other developers use it, since that path is only valid on my machine.
corepack
?The text was updated successfully, but these errors were encountered: