Skip to content

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:

First, remove the existing nvm installation:

Terminal window
# Remove nvm directory
rm -rf ~/.nvm
# Remove nvm lines from shell profile files
sed -i '/NVM_DIR/d' ~/.bashrc
sed -i '/nvm.sh/d' ~/.bashrc
sed -i '/bash_completion/d' ~/.bashrc
# If using zsh, also clean .zshrc
sed -i '/NVM_DIR/d' ~/.zshrc
sed -i '/nvm.sh/d' ~/.zshrc
sed -i '/bash_completion/d' ~/.zshrc
Terminal window
# Remove any system-installed node/npm
sudo apt remove nodejs npm -y
sudo apt autoremove -y
# Remove any remaining node modules or npm cache
rm -rf ~/.npm
rm -rf ~/.node-gyp
rm -rf /usr/local/lib/node_modules
Terminal window
# Remove any node-related paths from PATH
# Edit your ~/.bashrc or ~/.zshrc and remove any node/npm related PATH entries
nano ~/.bashrc
# Look for and remove lines like:
# export PATH=$PATH:/usr/local/bin/node
# export PATH=$PATH:/usr/local/bin/npm
Terminal window
# Download and install latest nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
# Reload your shell configuration
source ~/.bashrc
# Verify nvm installation
nvm --version
Terminal window
# Install latest LTS version
nvm install --lts
# Use the LTS version
nvm use --lts
# Set LTS as default
nvm alias default node
# Verify installation
node --version
npm --version
Terminal window
# Check which node/npm you're using
which node
which npm
# Should show paths like:
# ~/.nvm/versions/node/v20.x.x/bin/node
# ~/.nvm/versions/node/v20.x.x/bin/npm

After 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”
Terminal window
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash

Close and reopen terminal or source your profile

Section titled “Close and reopen terminal or source your profile”
Terminal window
source ~/.bashrc
Terminal window
nvm install --lts
Terminal window
node -v
npm -v
Terminal window
mkdir -p ~/.npm-global
npm config set prefix ~/.npm-global
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
Terminal window
npm install -g @anthropic-ai/claude-code
Terminal window
claude --version