Troubleshooting
Solutions to common issues when building with Varity.
Installation Issues
Section titled “Installation Issues””command not found: varitykit”
Section titled “”command not found: varitykit””The CLI is not installed or is not in your PATH.
-
Install the CLI:
Terminal window pip install varitykit -
Verify installation:
Terminal window varitykit --version -
If still not found, check your Python path:
Terminal window python -m varitykit --version
“ModuleNotFoundError: No module named ‘varitykit’”
Section titled ““ModuleNotFoundError: No module named ‘varitykit’””Python dependencies are missing.
pip install --upgrade varitykitPackage installation fails
Section titled “Package installation fails”If npm package installation fails:
# Clear npm cachenpm cache clean --force
# Delete node_modules and reinstallrm -rf node_modules package-lock.jsonnpm installDeployment Issues
Section titled “Deployment Issues””Credentials not found”
Section titled “”Credentials not found””Credentials are managed automatically by Varity. Run varitykit doctor to verify your setup. See Managed Credentials.
”Build failed”
Section titled “”Build failed””-
Verify your build works locally:
Terminal window npm run build -
Check for TypeScript errors:
Terminal window npx tsc --noEmit -
Ensure all dependencies are installed:
Terminal window npm install
“Upload failed”
Section titled ““Upload failed””Possible causes and solutions:
| Cause | Solution |
|---|---|
| Network timeout | Try again - temporary network issue |
| Large files | Split into smaller chunks |
| Rate limiting | Wait a few minutes and retry |
| Credentials issue | Run varitykit doctor to verify |
Authentication Issues
Section titled “Authentication Issues””PrivyStack: appId is required”
Section titled “”PrivyStack: appId is required””Set your Auth App ID in environment variables:
NEXT_PUBLIC_PRIVY_APP_ID=your_app_idOr use Varity development credentials (the SDK will use defaults if none provided).
Login button not appearing
Section titled “Login button not appearing”-
Verify
PrivyStackwraps your application:<PrivyStack appId={process.env.NEXT_PUBLIC_PRIVY_APP_ID}><App /></PrivyStack> -
Check browser console for errors
-
Ensure environment variables are loaded (restart dev server)
“Domain not allowed” error
Section titled ““Domain not allowed” error”Your domain needs to be allowed for authentication. Contact support@varity.so to allow your domain, or include localhost for local development.
Session not persisting
Section titled “Session not persisting”Check that:
PrivyStackis at the root of your app- You’re not accidentally clearing localStorage
- Cookies are enabled in the browser
Build Issues
Section titled “Build Issues”TypeScript errors in Varity packages
Section titled “TypeScript errors in Varity packages”Ensure you’re using compatible TypeScript version:
{ "devDependencies": { "typescript": "^5.0.0" }}“Cannot find module ‘@varity-labs/sdk’”
Section titled ““Cannot find module ‘@varity-labs/sdk’””-
Install packages:
Terminal window npm install @varity-labs/sdk @varity-labs/ui-kit @varity-labs/types -
Check package.json includes the dependencies
-
Clear and reinstall:
Terminal window rm -rf node_modulesnpm install
“React version mismatch”
Section titled ““React version mismatch””Varity UI Kit requires React 18+:
{ "dependencies": { "react": "^18.0.0", "react-dom": "^18.0.0" }}Runtime Issues
Section titled “Runtime Issues””Network request failed”
Section titled “”Network request failed””Check network connectivity:
varitykit doctorThis will verify your connection to Varity’s infrastructure.
”Operation failed”
Section titled “”Operation failed””Common causes:
| Error | Solution |
|---|---|
| Insufficient funds | Operations are free — contact support |
| Service not found | Verify configuration is correct |
| Invalid parameters | Check function arguments |
Slow performance
Section titled “Slow performance”-
Enable production mode:
Terminal window npm run build && npm start -
Check bundle size:
Terminal window npm run analyze -
Verify you’re using tree-shaking:
// Good - tree-shakeableimport { PrivyStack } from '@varity-labs/ui-kit';// Avoid - imports entire packageimport * as VarityUI from '@varity-labs/ui-kit';
CLI Issues
Section titled “CLI Issues””varitykit doctor” shows failures
Section titled “”varitykit doctor” shows failures”Run the doctor command to diagnose:
varitykit doctorCommon failures and fixes:
| Check | Fix |
|---|---|
| Environment variables | Create .env file with required vars |
| Network connectivity | Check internet connection |
| Project structure | Ensure package.json exists |
| Dependencies | Run npm install |
Deployment history not showing
Section titled “Deployment history not showing”Deployments are stored locally. Check:
ls ~/.varitykit/deployments/If empty, no deployments have been made from this machine.
Getting More Help
Section titled “Getting More Help”If you’re still stuck:
-
Search existing issues: GitHub Issues
-
Ask the community: Discord
-
Open a new issue with:
- Error message (full stack trace)
- Steps to reproduce
varitykit doctoroutput- OS and Node.js version
-
Email support: support@varity.so