Common Build Errors
Troubleshoot common build errors in the Ever Gauzy monorepo.
ERROR: Module not found
Cause: Missing or out-of-sync dependencies.
Fix:
# Clean and reinstall
rm -rf node_modules
yarn install
ERROR: Cannot find module '@gauzy/contracts'
Cause: Internal packages not built.
Fix:
# Build dependencies first
yarn nx build contracts
yarn nx build common
Angular CLI version mismatch
Cause: Global and local Angular CLI versions differ.
Fix:
npx ng version # Check versions
npm install -g @angular/cli@latest # Update global
Heap out of memory
Cause: TypeScript compilation consuming too much memory.
Fix:
# Increase Node.js memory limit
export NODE_OPTIONS="--max-old-space-size=8192"
yarn build
TypeORM: Entity not found
Cause: Entity not registered in module.
Fix: Ensure entity is imported in the module's TypeOrmModule.forFeature():
@Module({
imports: [TypeOrmModule.forFeature([MyEntity])],
})
MikroORM: Cannot read properties of undefined
Cause: MikroORM 6.x stricter metadata validation.
Fix: Use conditional decorators based on DB_ORM. See Custom Entity Fields.
NX Build Cache Issues
# Clear NX cache
npx nx reset
# Rebuild without cache
npx nx build api --skip-nx-cache
Related Pages
- Development Guide — getting started
- Monorepo Navigation — repo structure