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
8
votes
1 answer

How to import a component from a library (in nrwl/nx with Angular)

I would like to import my PageNotFoundComponent from my ui-components library into the router of my app. When I import the UiComponentsModule into my AppModule and use the components in my template, everything works just fine, but importing a…
Florian Leitgeb
  • 15,657
  • 6
  • 31
  • 40
8
votes
2 answers

How to integrate NativeScript into @nrwl/nx

How to share code between multiple NativeScript apps and multiple Angular apps using @nrwl/nx (Nx Workspace)?
Samuel R
  • 609
  • 5
  • 9
7
votes
5 answers

Uncaught SyntaxError: Cannot use 'import.meta' outside a module - Nx Monorepo

I created an angular nx monorepo and created two applications. When I start either of them I get the following error: I already saw some stackoverflow posts were the answers suggested to just add "type": "module" to package.json. But since it is a…
Stefan
  • 1,122
  • 3
  • 14
  • 38
7
votes
1 answer

NX: Copy one extra file to build directory

I have a project that I've built with nx and I'm deploying it to Google App Engine. It needs app.yaml in the same folder. Is there a way to tell nx builder to copy that extra file to the build directory next to everything else?
Konstantin Bodnia
  • 1,372
  • 3
  • 20
  • 43
7
votes
0 answers

How to configure dynamic aliased paths in Nx?

Background: I am building an Angular dashboard where I import widgets (Angular modules and components) dynamically (without routing). I achieved this with the help from this great article…
Max
  • 93
  • 3
  • 7
7
votes
3 answers

Use jest "watch mode" with nx test (nx CLI)

I have an app that was generated with Nx CLI. I can run tests for this app with Jest using the the command nx test myApp. This works fine. However, I would like to use Jest's "watch mode". when running my tests, and can't figure out how to achieve…
elethan
  • 16,408
  • 8
  • 64
  • 87
7
votes
1 answer

prettier vs. nx format:check

nx format:check expects no colon after else in html files:
but when I run prettier in the same project it expects a colon after else
why is this different? I thought that nx…
TmTron
  • 17,012
  • 10
  • 94
  • 142
7
votes
4 answers

nrwl/nx Workspace-Specific Schematics

I've been investigating the nrwl extensions and they look great. However, when I'm following their tutorial for Workspace Specific Schematics, the last step doesn't show me the command to run. Can you tell me how I run the schematic I created? I'm…
Steve
  • 141
  • 2
  • 7
6
votes
2 answers

NX: How to create a NX workspace in an existing empty git repository instead of creating it under a workspace name?

I have an existing repository. I have cleared all the unwanted files as I wanted to start a new NX-integrated project. But, I want to continue using the same repository as there are some files which I would prefer to be present in the root…
shet_tayyy
  • 5,366
  • 11
  • 44
  • 82
6
votes
2 answers

NX Error for Relative Imports within the Same Project

I'm getting an error when using TS aliased paths within the same project: Projects should use relative imports to import from other files within the same project I don't want this behavior. Any idea how to disable? I tried playing with the…
S. C.
  • 127
  • 1
  • 6
6
votes
1 answer

How to replace jest.spyOn().and.returnValue()?

While upgrading Angular (via Nx/NRWL) from 11 to 12, tests started to fail due to: Property 'and' does not exist on type 'SpyInstance<{ afterClosed: () => Observable<{ snoozeDate: Moment; snoozeNote: string; }>; }, []>'. There are ~30 some tests…
mrshickadance
  • 1,213
  • 4
  • 20
  • 34
6
votes
0 answers

Adding an existing angular project to an existing NX project

I have an existing NX project name myorg. which have already three application name one, two, three. I am able to create a new application (name: four) into that NX project (myorg) by the command: ng g @nrwl/schematics:application four but I…
Shatu
  • 845
  • 6
  • 10
6
votes
1 answer

How to set environment variables in cypress.json file through command line? (Angular CLI - nrwl nx)

I am new to cypress and learning day by day, we are trying to implement e2e tests using cypress in angular project. I am facing issues when I want to set env variables in cypress.json file through the command line This is my cypress.json file { …
user10251019
6
votes
1 answer

Error when running NestJS build artifact in Nx workspace

I'm running into errors when I try to run the build artifact of a NestJS app that was created within an Nx workspace. The error only occurs when I run the resulting artifact anywhere outside of the repository where no node_modules folder…
baumgarb
  • 1,955
  • 3
  • 19
  • 30
6
votes
2 answers

Is there a better way to build an Angular monorepo app with libraries?

I have several apps in my Angular monorepo project. Also there are about 5 libraries I've written to use across the apps. What I want to know is how to better build/architect these libraries. The ins are follows: Libraries are for internal usage…
Sergey
  • 7,184
  • 13
  • 42
  • 85
1 2
3
27 28