api_graphql_issues - wwwsolutions/nestjs-starter-kit GitHub Wiki
-
Buildable library depends on another library
ERROR
nx run api-config-app:build // --> ERROR libs/api/config/app/src/lib/api-config-app.module.ts:6:36 - error TS6059: File 'E:/repos-starters/wwwsolutions-nest-starter/libs/api/config/mongo/src/index.ts' is not under 'rootDir' 'libs/api/config/app'. 'rootDir' is expected to contain all source files.
SOLUTION
- Library
project.json
MUST HAVEtargets.build
field. - For example, command
nx generate @nrwl/workspace:library --name=xyz
will not producebuild
field.
- Library
-
NODE_ENV
is always set todeveloper
.ERROR In NestJs/Nodejs app in Nx.Dev workspace process.env.NODE_ENV is replaced during compilation from typescript to javascript very "smart way" to "development" string constant (everything like NODE_ENV is replaced).
SOLUTION
Only way how can I get real NODE_ENV in runtime is this code:
//process.env.NODE_ENV process.env['NODE' + '_ENV']
REFERENCES
process.env.NODE_ENV always 'development' when building nestjs app with nrwl nx
-
NX_* Environment Variables not working on prod
SOLUTION
-
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
ERROR
SOLUTION
REFERENCES