isomor-ng-nest
raw JSON → 2.7.0 verified Fri May 01 auth: no javascript
isomor-ng-nest v2.7.0 is a frontend/backend library for the isomor ecosystem, enabling direct function calls from UI to server without explicit API layers (REST/GraphQL). It uses Babel transpilation to separate frontend and backend code within a single project. Supports Node >=11 and ships TypeScript types. It is part of a set of packages for isomorphic TypeScript development with Angular (ng) and NestJS (nest) integrations. Release cadence is irregular, tied to isomor updates.
Common errors
error Cannot find module 'isomor-ng-nest' or its corresponding type declarations. ↓
cause Missing npm install or TypeScript not resolving the package types.
fix
Run
npm install isomor-ng-nest isomor and ensure tsconfig.json includes "esModuleInterop": true. error TypeError: isomorNgNest is not a function ↓
cause Importing as named export instead of default export.
fix
Use
import isomorNgNest from 'isomor-ng-nest' (default import). error Cannot find name 'AppModule'. ↓
cause AppModule not imported or defined in the file.
fix
Import or define the NestJS AppModule before using it in the configuration.
error Error: isomor requires Node >=11 ↓
cause Running on an older Node.js version.
fix
Upgrade Node.js to v11 or higher.
Warnings
gotcha isomor-ng-nest requires isomor as a peer dependency. Ensure isomor is installed at the same version or compatible. ↓
fix npm install isomor@^2.7.0
breaking In v2.0.0, the API changed from a class-based to a function-based initialization. Old code using `new IsomorNgNest()` will break. ↓
fix Replace `new IsomorNgNest()` with the functional `isomorNgNest()` export.
deprecated The `NestServer` export is deprecated in favor of inline configuration within `isomorNgNest()`. ↓
fix Use the `server` property directly in the config object.
gotcha TypeScript strict mode may cause issues with emitted client code due to complex generics. Use `skipLibCheck: true` as workaround. ↓
fix Add `"skipLibCheck": true` to tsconfig.json
breaking Node.js version >=11 required; earlier versions are not supported and will throw runtime errors. ↓
fix Upgrade Node.js to v11 or later.
Install
npm install isomor-ng-nest yarn add isomor-ng-nest pnpm add isomor-ng-nest Imports
- isomorNgNest
import isomorNgNest from 'isomor-ng-nest' - NestServer wrong
import NestServer from 'isomor-ng-nest'correctimport { NestServer } from 'isomor-ng-nest' - NestModule
import { NestModule } from 'isomor-ng-nest'
Quickstart
import isomorNgNest from 'isomor-ng-nest';
// Initialize isomor with NestJS
const app = await isomorNgNest({
server: {
port: 3000,
module: AppModule
},
client: {
output: './src/generated-client.ts'
}
});
app.start();