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
13
votes
7 answers

Nx CLI run many command is not working for multiple apps

I have tried using Nx in an attempt to make use of Monorepos. I have been facing an issue to serve multiple apps via nx run-many command. Can anyone correct me if I'm doing something wrong? Command used: nx run-many --target=serve --all I can see…
Chan15
  • 929
  • 2
  • 9
  • 16
13
votes
1 answer

How to globally inject value across modules in NestJS?

I'm working with nx workspace and nestjs. I would like to inject a value across multiple modules in nestjs app. Final goal is to reproduce similar way of configuration management as vsavkin mentioned for Angular But it seems it's not possible, or I…
Thierry Falvo
  • 5,892
  • 2
  • 21
  • 39
13
votes
2 answers

Include a package for some libs in Nrwl/Nx workspace

It seems like in a Nrwl/Nx workspace there is only a single package.json file. Now if we have multiple applications, each dependent on different packages, then we have to include all of those package in the single package.json file and wouldn't that…
Esfandiar
  • 310
  • 4
  • 8
12
votes
5 answers

Building library with imports from another library using NX Monorepo

Here is the case. I am using Nrwl NX Monorepo. I have 2 libraries lib-a and lib-b both are publishable libraries created via NX. Now I create a MyClass.ts in lib-a. Naturally under paths in workspace/tsconfig.json paths NX creates an alias to this…
Hivaga
  • 3,738
  • 4
  • 23
  • 36
11
votes
1 answer

peerDependencies configuration for publishable libraries with NX & Angular

I have a monorepo using NX & Angular and I am publishing some libs to NPM and i have the following scenario apps only_App libs lib_A // v1.0.0 lib_B // v1.0.0 lib_C // v1.0.0 lib_A depends on lib_B and lib_C. In the pre-built…
Pato
  • 189
  • 1
  • 9
11
votes
1 answer

NRWL NX library typescript ambient declaration files

I have a basic setup in my new NX workspace /apps/my-app (node type) /libs/some-lib (node type) Both created with nx cli commands: i.e. nx g @nrwl/node:lib some-lib --simpleModuleName=true For library I wanted to use ambient declaration files…
11
votes
1 answer

Nrwl Nx build for production missing node modules bundle

I have a Nrwl Nx repo with different apps (angular, nodejs with express) and shared libs inside. The repo was created with the nx cli and I want to build for production one of the express apps. nx build:production myexpressapp The bundle I get is…
Rares P
  • 303
  • 3
  • 15
11
votes
1 answer

Why does nrwl nx create a separate e2e project for each app?

When creating a new nx workspace (i.e. with create-nx-workspace) and then generating an app (with ng g app) it creates an app folder inside the apps folder (so far so good) and also another app-e2e folder, also inside the apps folder. In my mind it…
10
votes
2 answers

What are the differences between a @nrwl/js library and a @nrwl/workspace library?

I have created both in a testing environment but am still having trouble to differentiate between the use cases of the two. They both have the same file structure, slightly different tsconfig.json file, @nrwl/js library is stricter by 2 extra props.…
fmi21
  • 485
  • 3
  • 15
10
votes
4 answers

NX - UI Library with Storybook and individually exported components

I'm exploring Nx with Angular (relatively new to both) and trying to figure out how to generate a component library that: Can run Storybook, and Can be imported one component at a time, rather than dragging the whole module/all the components into…
Sasha
  • 6,224
  • 10
  • 55
  • 102
10
votes
4 answers

Nrwl nx command to generate lib for nest module

I am new to nrwl nx cli and extensively searched through their documentation and could not find the command to generate the nestjs module as lib rather than the actual module within app. The reason why I want to create the nestjs module as lib is…
Atul Chaudhary
  • 3,698
  • 1
  • 31
  • 51
9
votes
3 answers

How to use short paths for importing in Nx Workspace?

I have created an NX Workspace using Angular preset. Where I have one app and two libraries. Inside my app, I am trying to use shorter paths for import. With my current approach inside my app, I can use short paths for all files and folders for my…
RAHUL KUNDU
  • 745
  • 2
  • 12
  • 33
9
votes
4 answers

Why nrwl/nx is better that angular@6 vanilia?

Biggest advantage og nrwl/nx was implementing multiple workspaces in one project. Now angular 6 supperts it as well. What are other adventages of nx over angular@6 ?
piernik
  • 3,507
  • 3
  • 42
  • 84
8
votes
1 answer

How to build and package only the relevant dependencies using nx?

I have a project using nx that has many packages in it. My problem is that I only have a single package.json file so if I want to build only one package I still have to build the root project using npm install. This is a problem because during the…
Adam Arold
  • 29,285
  • 22
  • 112
  • 207
8
votes
2 answers

Nx React inject environment variables at runtime

I have a Nx monorepo with multiple react applications. I want to be able to run the build once and then deploy the same build to multiple environments (e.g. dev, test, production). What I used to do in previous projects where I wasn't using Nx, it…
marinvirdol
  • 1,263
  • 1
  • 12
  • 18
1
2
3
27 28