Skip to content
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

alpine-node won't preinstall pnpm despite pnpmVersion specified #61

Open
lolmaus opened this issue Jun 29, 2024 · 5 comments
Open

alpine-node won't preinstall pnpm despite pnpmVersion specified #61

lolmaus opened this issue Jun 29, 2024 · 5 comments

Comments

@lolmaus
Copy link

lolmaus commented Jun 29, 2024

Hi! Thank you for the devcontainer features!

Here's my devcontainer.json: https://github.com/lolmaus/slice-and-dice/blob/3d8276309c45dd0ce57631b3ed001096685cae5e/.devcontainer/devcontainer.json

I update the pnpmVersion property from 9.2.0 to 9.4.0 like this:

image

I save the file and issue the Dev Containers: Rebuild Container Without Cache palette command. It rebuilds.

But when I pop the terminal and do pnpm -v, it replies with Corepack is about to download https://registry.npmjs.org/pnpm/-/pnpm-9.2.0.tgz. So pnpm is not preinstalled and the wrong version is offered to be installed:

image

Here are the logs: https://gist.github.com/lolmaus/4c68bd3bca399ee8e991f93b25eb7214

The prharse Preparing [email protected] for immediate activation... is repeated 34 times! Yet, pnpm is not preinstalled.

Please help.

@cirolosapio
Copy link
Owner

fixed with commit

could you retry ?

@cirolosapio
Copy link
Owner

ping @lolmaus

@lolmaus
Copy link
Author

lolmaus commented Jul 15, 2024

@cirolosapio Nope. :(

Here's my devcontainer.json:
https://github.com/lolmaus/lolma.us-sveltekit/blob/f30e598/.devcontainer/devcontainer.json#L10

I change the pnpm version at the the highlighted line to 9.5.0, save the file, then run the palette command Dev Containers: Rebuild Container Without Cache.

When it's done, I pop the terminal in VS Code and run pnpm --version, I get:

Corepack is about to download https://registry.npmjs.org/pnpm/-/pnpm-9.2.0.tgz

image

@cirolosapio
Copy link
Owner

I think this is the normal behavior if in your package json is setted [email protected]

@lolmaus
Copy link
Author

lolmaus commented Jul 19, 2024

@cirolosapio Hey, thank you for pointing that out.

I have :

  • deleted the packageManager entry from package.json;
  • changed pnpmVersion to 9.3.0 in devcontainer.json;
  • rebuilt the container without cache.

Now, when I do pnpm --version, I get:

vscode ➜ /workspaces/lolma.us (ci) $ pnpm --version
! Corepack is about to download https://registry.npmjs.org/pnpm/-/pnpm-9.5.0.tgz
? Do you want to continue? [Y/n] 

I expect 9.3.0 to be preinstalled at this point, but instead it offers to install 9.5.0.

The devcontainer feature is defined like this, am I using the latest version?

	"features": {
		"ghcr.io/cirolosapio/devcontainers-features/alpine-node:0": {
			"corepack": true,
			"pnpmVersion": "9.3.0"
		},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants