Skip to content

Troubleshooting

This guide helps you resolve common issues you might encounter when using Pika Framework.


First, verify your setup:

Terminal window
# Check Node.js version (should be 22+)
node --version
# Check pnpm version
pnpm --version
# Check Pika CLI version
pika --version
# Check AWS CLI (if using AWS features)
aws --version
  • Installation Issues: Node.js version, pnpm installation, permissions
  • Build Errors: TypeScript compilation, missing dependencies
  • Deployment Issues: AWS credentials, CDK bootstrap, IAM permissions
  • Runtime Errors: Environment variables, network connectivity, AWS service limits

Solution:

Terminal window
# Check current version
node --version
# Update Node.js with Homebrew
brew upgrade node

Solution:

Terminal window
# Use the official installer (recommended)
curl -fsSL https://get.pnpm.io/install.sh | sh -
# Verify installation
pnpm --version

Solution:

Terminal window
# Run in root of project, removes all .turbo, node_modules, etc.
pnpm run clean
# In root, install all deps
pnpm install
# In root, try to build everything
pnpm build
# In root, check typescript types
pnpm run check-types

Solution:

Terminal window
# Reinstall all dependencies
pnpm install
# Clear pnpm cache
pnpm store prune
# Check for workspace issues
pnpm list --depth=0

Solution:

Terminal window
# Check build logs for specific errors
pnpm build --verbose
# Check for environment-specific issues
echo $NODE_ENV

Solution:

Terminal window
# Configure AWS CLI
aws configure
# Verify credentials
aws sts get-caller-identity

Solution:

Terminal window
# Bootstrap CDK in your account/region
cdk bootstrap
# Verify bootstrap
aws cloudformation describe-stacks --stack-name CDKToolkit

Solution:

  • Ensure your AWS user has the necessary permissions
  • Use an IAM role with appropriate permissions
  • Contact your AWS administrator for proper permissions

Required permissions:

{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": ["cloudformation:*", "s3:*", "lambda:*", "apigateway:*", "iam:*", "logs:*", "cloudwatch:*"],
"Resource": "*"
}
]
}

Solution:

Terminal window
# Verify certificate exists
aws acm list-certificates --region us-east-1
# Check certificate ARN format
# Should be: arn:aws:acm:region:account:certificate/cert-id

Solution:

Terminal window
# List VPCs
aws ec2 describe-vpcs

Solution:

Terminal window
# Check if development server is running
lsof -i :3000
# Check for build errors
cd apps/pika-chat && pnpm build

Solution:

Terminal window
# Check if services are deployed
aws cloudformation describe-stacks --stack-name mycompany-pika

Solution:

Terminal window
# Check authentication provider configuration
cat apps/pika-chat/src/lib/server/auth-provider/index.ts
# Check browser cookies and local storage
# Clear browser cache and cookies if needed

Solution:

Terminal window
# Check internet connection
ping github.com
# Use debug mode for more information
pika sync --debug

Solution:

Terminal window
# Check sync configuration
cat .pika-sync.json
# Add files to userProtectedAreas
# Edit .pika-sync.json and add:
"userProtectedAreas": ["my-custom-file.ts"]

Solution:

Terminal window
# Review conflicts
pika sync --diff
# Resolve conflicts manually
# Edit conflicted files and remove conflict markers

Terminal window
# Enable debug mode for various commands
pika sync --debug
pnpm run dev -- --debug
cdk deploy --debug
# Check environment variables
env | grep -i pika
env | grep -i aws
Terminal window
# View recent logs
aws logs tail /aws/lambda/mycompany-pika-service --follow
Terminal window
# Check Lambda function performance
aws cloudwatch get-metric-statistics \
--namespace AWS/Lambda \
--metric-name Duration \
--dimensions Name=FunctionName,Value=mycompany-pika-service \
--start-time 2024-01-01T00:00:00Z \
--end-time 2024-01-02T00:00:00Z \
--period 3600 \
--statistics Average,Maximum

  1. Check this troubleshooting guide for your specific issue
  2. Search existing issues on the GitHub repository
  3. Check the documentation for your specific use case
  4. Try the solutions above for common issues

Environment details:

  • Operating system and version
  • Node.js version
  • pnpm version
  • Pika CLI version

Error details:

  • Exact error message
  • Steps to reproduce
  • Expected vs actual behavior

Debug information:

  • Console output with --debug flag
  • Relevant log files
  • Configuration files (without sensitive data)

What you've tried:

  • Solutions attempted
  • Workarounds that work/don't work

Still having issues? Create a detailed issue on GitHub with all the information above, and the community will help you resolve it!