In mac and in support country; but input "claude" reprot Unable to connect to Anthropic services
Error content:
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
Solution:
I experienced the same issue on my Mac and finally found this solution worked for me:
Open your .claude.json
in your home folder;
find -name ".claude.json" 2>/dev/null
Add the below line into the json and save;
"hasCompletedOnboarding": true
The complete json after the modification would look like:
{
"installMethod": "unknown",
"autoUpdates": true,
"userID": "[your_user_id]",
"firstStartTime": "[time]",
"projects": {
"/Users/[your_home_folder]": {
"allowedTools": [],
"history": [],
"mcpContextUris": [],
"mcpServers": {},
"enabledMcpjsonServers": [],
"disabledMcpjsonServers": [],
"hasTrustDialogAccepted": false,
"projectOnboardingSeenCount": 0,
"hasClaudeMdExternalIncludesApproved": false,
"hasClaudeMdExternalIncludesWarningShown": false
}
},
"hasCompletedOnboarding": true
}
Reference:
https://github.com/anthropics/claude-code/issues/2279