Claude Code Install Steps
I’ll help you completely remove and reinstall nvm/npm in your WSL environment. Here’s a step-by-step process:
Remove Current nvm Installation
Section titled “Remove Current nvm Installation”First, remove the existing nvm installation:
# Remove nvm directoryrm -rf ~/.nvm
# Remove nvm lines from shell profile filessed -i '/NVM_DIR/d' ~/.bashrcsed -i '/nvm.sh/d' ~/.bashrcsed -i '/bash_completion/d' ~/.bashrc
# If using zsh, also clean .zshrcsed -i '/NVM_DIR/d' ~/.zshrcsed -i '/nvm.sh/d' ~/.zshrcsed -i '/bash_completion/d' ~/.zshrcRemove Any System-Installed Node/npm
Section titled “Remove Any System-Installed Node/npm”# Remove any system-installed node/npmsudo apt remove nodejs npm -ysudo apt autoremove -y
# Remove any remaining node modules or npm cacherm -rf ~/.npmrm -rf ~/.node-gyprm -rf /usr/local/lib/node_modulesClean Environment Variables
Section titled “Clean Environment Variables”# Remove any node-related paths from PATH# Edit your ~/.bashrc or ~/.zshrc and remove any node/npm related PATH entriesnano ~/.bashrc
# Look for and remove lines like:# export PATH=$PATH:/usr/local/bin/node# export PATH=$PATH:/usr/local/bin/npmFresh nvm Installation
Section titled “Fresh nvm Installation”# Download and install latest nvmcurl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
# Reload your shell configurationsource ~/.bashrc
# Verify nvm installationnvm --versionInstall Node.js
Section titled “Install Node.js”# Install latest LTS versionnvm install --lts
# Use the LTS versionnvm use --lts
# Set LTS as defaultnvm alias default node
# Verify installationnode --versionnpm --versionFinal Verification
Section titled “Final Verification”# Check which node/npm you're usingwhich nodewhich npm
# Should show paths like:# ~/.nvm/versions/node/v20.x.x/bin/node# ~/.nvm/versions/node/v20.x.x/bin/npmAfter completing these steps, restart your WSL terminal or run source ~/.bashrc to ensure all changes take effect. This will give you a clean nvm installation that properly manages your Node.js versions for your BigCommerce Stencil development work.
Install NVM (Node Version Manager) for Linux
Section titled “Install NVM (Node Version Manager) for Linux”curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bashClose and reopen terminal or source your profile
Section titled “Close and reopen terminal or source your profile”source ~/.bashrcInstall Node.js
Section titled “Install Node.js”nvm install --ltsVerify Node installation
Section titled “Verify Node installation”node -v
npm -vSetup npm global directory
Section titled “Setup npm global directory”mkdir -p ~/.npm-globalnpm config set prefix ~/.npm-globalecho 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrcsource ~/.bashrcInstall Claude Code
Section titled “Install Claude Code”npm install -g @anthropic-ai/claude-codeVerify installation
Section titled “Verify installation”claude --version