To solve this issue, you need to be authenticated to even read and download packages from the GitHub NPM Registry.
-
Head over to https://github.com/settings/tokens, create a token with only permission
read:packages
. -
Run this command:
$ npm login --registry=https://npm.pkg.github.com
-
Login with:
- Username: Your GitHub username
- Password: The token you created above
pnpm install
should now work fine.