This is a monorepo containing:
common/- Shared JavaScript/TypeScript utilitiesmobile/- React Native mobile appserver/- Python/Node.js backend server
When encountering type errors or compatibility issues between npm packages:
These are our "anchor" packages that define the version constraints. Other packages must be compatible with these:
- Node.js - Runtime version
- React - UI framework
- React Native - Mobile framework (for mobile/)
-
Always upgrade libraries to newer versions that are compatible with our anchors, rather than downgrading anchors or using workarounds.
-
Check peer dependencies before upgrading:
npm view <package>@latest peerDependencies --json npm view <package>@latest dependencies --json
-
Remove outdated @types packages when libraries include their own TypeScript definitions:
- Modern packages (like react-intl v7+) often ship with built-in types
- Check if
@types/<package>is needed by looking for"types"in the package's package.json - Remove from devDependencies if the library has built-in types
-
Use npm overrides for transitive dependency conflicts:
{ "overrides": { "@types/react": "^19.0.0" } }
ReactNode type conflicts (bigint is not assignable to ReactNode):
- This usually means different @types/react versions are in use
- Solution: Upgrade the library to a version that supports your React types version
- Example: react-intl v7+ supports @types/react 16-19
"Cannot be used as JSX component":
- Often caused by React type version mismatches between packages
- Check:
npm ls @types/reactto see all versions installed - Fix: Add npm overrides or upgrade conflicting packages
After fixing compatibility issues, always verify:
# Check TypeScript compiles
npx tsc --noEmit
# Run unit tests
cd common && npm testSee also:
server/CLAUDE.md- Server deployment and Docker instructions