之前一直白嫖的Copilot,最近Claude Code出了官方的插件,就想试一下。
结果安装完打开报错了
Error: Claude Code requires Node.js version 18 or higher to be installed.
原因其实是因为我是用在WSL环境中,但是环境中没有 Node 及 Claude Code,安装一下就好了。
首先安装一下 NVM
- Install NVM (Node Version Manager) in WSL:
sudo apt-get install curl curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash
- Close and reopen your terminal, or run:
source ~/.bashrc
- Install Node.js using NVM:
nvm install node
- Verify Node.js is installed in the Linux environment:
which npm
Should show: /home/username/.nvm/versions/node/vX.X.X/bin/npm
5. Now install packages through this Node.js installation:
npm config set os linux npm install -g @anthropic-ai/claude-code
安装完成后,打开 Claude Code,Console这里会给出登录方式,点击链接,会给一个Token,粘贴进来就可以了。
Claude支持对话框的方式及Console的方式,在Setting里边设置一下就好了。
6
15


快银 VPN,一键连接全球节点,线路稳定、延迟低。支持 Windows、macOS 等多平台,TUN 全局模式覆盖全部应用流量。无需复杂配置,下载即用。
15 条回复
排序