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

Does not work on WSL2 Ubuntu 24.04 #2003

Open
llamerr opened this issue Feb 23, 2025 · 0 comments
Open

Does not work on WSL2 Ubuntu 24.04 #2003

llamerr opened this issue Feb 23, 2025 · 0 comments

Comments

@llamerr
Copy link

llamerr commented Feb 23, 2025

I have Ubuntu 24.04 with zsh installed in WSL2 and was following a guide on node site: https://nodejs.org/en/download

# On most Unix systems including macOS, you can install with a single command:
curl https://get.volta.sh | bash
# Download and install Node.js:
volta install node@23
# Verify the Node.js version:
node -v # Should print "v23.8.0".
# Download and install pnpm:
corepack enable pnpm
# Verify pnpm version:
pnpm -v

When I tried to execute corepack enable pnpm I got an error zsh: /mnt/c/Program Files/nodejs/corepack: bad interpreter: /bin/sh^M: no such file or directory

According to this, it related to PATH not being defined properly https://stackoverflow.com/questions/39311147/cannot-run-npm-commands, I tried to follow some advices, updating my .zshrc manually, but without success, so I tried to use nvm, and it worked with it

# Download and install nvm:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
# in lieu of restarting the shell
\. "$HOME/.nvm/nvm.sh"
# Download and install Node.js:
nvm install 23
# Verify the Node.js version:
node -v # Should print "v23.8.0".
nvm current # Should print "v23.8.0".
# Download and install pnpm:
corepack enable pnpm
# Verify pnpm version:
pnpm -v
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

1 participant