Questions tagged [nrwl]

Nrwl - Company behind Nx development. Nrwl provides consulting in the frontend space, helping enterprise teams scale their development. Use nrw-nx if you want to tag a Nx specific question

Nrwl is the company behind Nx development. Nx is an open source smart, fast and extensible build system. For more info, visite nx.dev.

Nrwl provides consulting in the frontend space, helping enterprise teams scale their development efforts.

407 questions
93
votes
23 answers

Could not find an NgModule. Use the skip-import option to skip importing in NgModule

I get the error in the subject of this post when I use the CLI to create a new component: ng g c my-component --project=my-project (No component is created) I've seen other posts with the same error message, but none of them also include Nrwl/Nx,…
TimTheEnchanter
  • 3,370
  • 1
  • 26
  • 47
70
votes
5 answers

How to clear Nx cache

I have an Nx monorepo (https://nx.dev). It has a folder with Nx cache (./node_modules/.cache/nx/). Its size for now is over 3GB. Is there a command for clear this cache?
Pax Beach
  • 2,059
  • 1
  • 20
  • 27
55
votes
1 answer

the difference between nx and Lerna ? (monorepos)

hello i'm in new in monorepos world and i'm now searching about different monorepos tools and i found two intersting tools Nx(nrwl) and lerna but i didn't understand the real differnce between these two tools so any help and thanks
anis khalfaoui
  • 779
  • 1
  • 6
  • 12
44
votes
6 answers

how can i run a specific angular spec test file in NX workspace?

is there any way to run an specific angular spec test file in Nx work space? Recently i moved my Angular 4 cli application into Nx work space. Previously i used fdescribe to achieve this functionality. So please suggest me if there is any…
Raj Kumar
  • 583
  • 2
  • 5
  • 9
25
votes
2 answers

eslint rule @nrwl/nx/enforce-module-boundaries fails

Intro I was very confused with that rule when I recently ported the Ng code base to Nx 12.x. I hope this post helps others who begin migrating from Ng to Nx. The code base above is a rather small single repo which is now used in production. When…
Juri Sinitson
  • 1,445
  • 1
  • 14
  • 18
23
votes
2 answers

How to use app environment.ts in libs in nrwl/nx workspace?

If I have an Authentication lib, with components, service, ngrx, etc... How I can access the environment of the app implementing Authentication lib? So the Auth service should knows the backend url to make the sign in stuff. So: import { environment…
J0H4N_AC
  • 499
  • 1
  • 5
  • 10
21
votes
1 answer

Angular Nx Nrwl - Cannot parse tsconfig.base.json: PropertyNameExpected in JSON when try to create a new lib

Im getting this error Cannot parse tsconfig.base.json: PropertyNameExpected in JSON at position 891 when i run nx g @nrwl\angular:lib libName on CLI my tsconfig.base.json { "compileOnSave": false, "compilerOptions": { "rootDir": ".", …
Luis Fernando
  • 1,146
  • 8
  • 21
20
votes
5 answers

Nrwl Nx: different version numbers and libs

I want to start an Angular project using Nrwl Nx (multiple apps in one project; https://nrwl.io/nx), but I have two questions: How can I specify different version numbers to the different apps? Usually I give a version number in package.json, but…
Roland Rácz
  • 2,879
  • 3
  • 18
  • 44
17
votes
6 answers

NRWL NX importing lib error TS2307: Cannot find module '@eduboard/interfaces'

I've just created a new NX project for work and I've created a lib for out interfaces to have them on the backend and the front end. I'm getting this error when I compile apps/askeddi/src/app/pages/global-admin/global-admin.component.ts(5,38): error…
Skel
  • 1,611
  • 3
  • 16
  • 36
16
votes
6 answers

process.env.NODE_ENV always 'development' when building nestjs app with nrwl nx

My NX application's npm run build:server calls ng build api-server that triggers the @nrwl/node:build builder. It builds the NestJS application as main.js. Things work except I wanted process.env.NODE_ENV to be evaluated at runtime but I think it…
kctang
  • 10,894
  • 8
  • 44
  • 63
15
votes
1 answer

Is it possible to use different apps as git submodules in a nx workspace?

I want to build a nestjs backend which is used by a angular frontend application. Each of them for now in a single repository. I stumbled over nrwl-nx for monorepo tooling and am really intrigued to use it. But my question now is: is it possible to…
Hüftl
  • 211
  • 2
  • 12
15
votes
1 answer

Managing shared styles and assets in Ngrx-nx Monorepo

I am trying to set up shared styles and assets (i.e. fonts) in a nrwl-nx monorepo for use in libraries and apps. My desired outcome is having a library 'theme' that provides shared styles scss variables and mixins fonts for other libs and…
derdaani
  • 538
  • 1
  • 3
  • 12
14
votes
1 answer

Difference between `nx affected:lint --fix` and `nx format:write`

What is the difference between nx affected:lint --fix and nx format:write? Different articles does seem to mention that code should be formatted with nx format:write command, but it doesn't seem that it fully relies on ESLint rules. After formatting…
InsFi
  • 1,298
  • 3
  • 14
  • 29
14
votes
8 answers

How to find the reason of "Cannot find module" for nrwl modules?

I use nrwl.io in my project. I created several libs: ng g lib rest //ok ng g lib services //ok ng g lib models //created ok, but "Cannot find module " later on! All of these libs were successfully created, but when I try to import my models lib I…
S Panfilov
  • 16,641
  • 17
  • 74
  • 96
14
votes
2 answers

How to integrate firebase in Nrwl Nx

I'd really like to integrate firebase as well as firebase cli to my apps in Nx but don't know how. I use firebase functions/hosting/cli-tools, etc. Ideally I'd like to be able to use the firebase cli to deploy individual apps for hosting and cloud…
tommyc38
  • 703
  • 1
  • 8
  • 21
1
2 3
27 28