安装claude code出现成功,调用claude出现报错:


 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

解决办法:

1、打开claude.json

2 、在文档末尾加上 "hasCompletedOnboarding": true

"hasCompletedOnboarding": true

加上后你可能会出现新的错误

  Configuration Error

  The configuration file at /Users/shine/.claude.json contains invalid JSON.

  Expected ',' or '}' after property value in JSON at position 208 (line 6
  column 5)

解决办法:刚刚加的那一行上面忘记加逗号了,加上,

注意是英文的逗号

Logo

欢迎加入DeepSeek 技术社区。在这里,你可以找到志同道合的朋友,共同探索AI技术的奥秘。

更多推荐