i use mac,and in support country; but input "claude" reprot Unable to connect to Anthropic services;
Status Closed — not planned
Maintainer reply None cached
Activity 14 comments · opened Jun 18, 2025 · closed Jan 11, 2026
Unable to connect to Anthropic services
Failed to connect to api.anthropic.com: ECONNREFUSED
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
14 Comments
I also see this error.
@xuhongxin I managed to figure out that when installing claude globally it was located in opt/homebrew since I had installed node with homebrew. I uninstalled node and also uninstalled node. I then used nvm to install node instead, and globally installed claude again with
npm install -g @anthropic-ai/claude-code- at this point the installation was now in my nvm folder instead. I ran claude again and it worked.thank you ,but my claude now is in the nvm path; the whole path is:
/Users/xuhongxin8477/.nvm/versions/node/v22.14.0/bin/claude;
and the error is still there
I am also unable to start Claude code from the command line on my Mac:
MacOS user
I fixed it by deleting all those claude config files:
rm -rf ~/.claude*
and then reinstall claude, and it works.
I experienced the same issue on my Mac and finally found this solution worked for me:
.claude.jsonin your home folder;The complete json after the modification would look like:
Hope this could help!
i also see this error in linux server
thanks to @dex1n ! Following your nice suggestion, i add the below line into the .claude.json and it works!
"hasCompletedOnboarding": truethx Following your nice suggestion, i add the below line into the .claude.json and it works!
This works. I was able to fix the error after adding this line.
Awesome, it can also be used on Windows
问题解决了,但是后续如何使用呢,无法登入Claude code
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.