Skip to main content

Troubleshooting

Credentials Not Working

tfcode validate
tfcode setup

echo $TF_WORKSPACE_ID
echo $TF_API_KEY
echo $TF_REGION

MCP Tools Not Loading

  1. Verify credentials with tfcode validate
  2. Check network connectivity to MCP server
  3. Check logs:
grep "mcp.*error" ~/.local/share/tfcode/log/dev.log

Binary Not Found

npm uninstall -g @toothfairyai/tfcode
npm cache clean --force
npm install -g @toothfairyai/tfcode

Permission Errors

sudo chown -R $(whoami) ~/.npm-local

Server Won't Start

Port in use:

tfcode serve --port 4097
tfcode serve --port 0

CORS errors:

tfcode serve --cors http://localhost:3000 --cors https://your-app.com

Plugin Not Loading

  1. Verify file is in .tfcode/plugins/ or ~/.config/tfcode/plugins/
  2. For npm plugins, check the package name in tfcode.json
  3. Check logs: tfcode --log-level DEBUG

Plugin dependencies not installing — ensure .tfcode/package.json exists with required dependencies.

Model Not Available

tfcode providers list
tfcode validate
tfcode models --refresh

Logging

tail -f ~/.local/share/tfcode/log/dev.log
tfcode --log-level DEBUG