Windows 10 安装完 Claude Code 运行 claude 命令提示错误:

Claude Code 可能在您所在的国家/地区不可用:

Unable to connect to Anthropic services Failed to connect to api.anthropic.com: ERR_BAD_REQUEST Please check your internet connection and network settings. Note: Claude Code might not be available in your country. Check supported countries at https://anthropic.com/supported-countries

解决办法:

修改配置文件:C:\Users\Jian\.claude.json(我的用户名Jian, 将Jian替换为你的用户名): 在最后添加 "hasCompletedOnboarding": true:

完整文件:

{
  "installMethod": "native",
  "autoUpdates": false,
  "firstStartTime": "2026-03-01T10:51:03.305Z",
  "opusProMigrationComplete": true,
  "sonnet1m45MigrationComplete": true,
  "userID": "xxx",
  "cachedChromeExtensionInstalled": false,
  "changelogLastFetched": 1772416871804,
  "autoUpdatesProtectedForNative": true,
  "hasCompletedOnboarding": true 
}

Logo

中国智能体开发者社区,聚焦智能体与大模型开发,提供前沿资讯、实用工具链、开源项目及行业案例。通过技术沙龙、开发者大赛等活动,促进经验交流与协作,助力开发者快速构建创新智能应用。

更多推荐