Questions tagged [nrwl-nx]

Nx is an open source, next generation build system with first class monorepo support and powerful integrations.

Nx - Smart, Fast and Extensible Build System

Nx is an open source, next generation build system with first-class monorepo support and powerful integrations. It helps you architect, test, and build at any scale, integrating seamlessly with modern technologies and libraries while providing a robust CLI, caching, dependency management, and more.

Nx comes with a set of plugins for TypeScript, Angular, React, Node, Storybook, Cypress, Jest, and more, maintained by the Nx core team and a huge set of community provided extensions.

Find out more on nx.dev and on GitHub.

807 questions
8
votes
3 answers

concatLatestFrom with multiple selectors ngrx

I am trying to get 2 selectors with the latest concatLatestFrom that was introduced in NgRx 12, however i cant seem to understand what i am doing wrong and i am unable to achieve this. I have an effect that looks like this loadAllCases$ =…
Harry
  • 3,333
  • 3
  • 18
  • 28
8
votes
1 answer

Lint rule "no-restricted-imports" throw error when patterns group specified

I configured .eslintrc.json in Nx/nrwl monorepo for React project. When I add group to pattern attribute to no-restricted-import "rules": { "no-restricted-imports": [ "error", { "patterns": [ { "group":…
Vaibhav
  • 1,412
  • 1
  • 10
  • 14
8
votes
1 answer

Serving an NX monorepo of angular apps in Docker-compose

I have an NX monorepo with 2 apps: Shop Landing I wish to use docker-compose to run my entire environment with eventually some APIs and a database etc etc. I created a docker-file that takes arguments and could be re-used to to run multiple…
Dylan Snel
  • 671
  • 2
  • 7
  • 26
8
votes
2 answers

Why am i getting error on using any `nx` commands

Command used : nx internal/modules/cjs/loader.js:983 throw err; ^ Error: Cannot find module '@nrwl/workspace/src/command-line/supported-nx-commands' Require stack: - /Users/shawntony/projects/ktp-web/node_modules/@nrwl/cli/lib/init-local.js -…
Vinz and Tonz
  • 3,487
  • 5
  • 21
  • 32
8
votes
1 answer

How to pass arguments to ng-cli through nx affected:test?

I want to pass some arguments to ng test command when running affected projects (for CI purposes). For example: ng test --codeCoverage=true --watch=false --progress=false. How it can be done through nx affected:test? Tried nx affected --help, but it…
nickbullock
  • 6,424
  • 9
  • 27
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
7
votes
2 answers

NX Angular project build failed after upgrading to Webpack 5.79.0

My nx monorepo angular project builds correctly with version 5.78.0 but got the following errors after upgrading to 5.79.0 nx: 15.9.2 angular: 15.2.6 Error: Module parse failed: parser.destructuringAssignmentPropertiesFor is not a function File was…
Eddie Chen
  • 343
  • 2
  • 8
7
votes
1 answer

Nrwl NX JavaScript heap out of memory on lint

I am working within an Nx monorepo with many Angular 15 applications, and some shared libraries. I generated a new Angular application using the nx cli, which worked great. I can serve and build the application without issue. The issue comes when I…
bjwhip
  • 407
  • 1
  • 9
  • 18
7
votes
2 answers

Support for the experimental syntax 'flow' isn't currently enabled (7:8):

I've been using a Mono repo to share react native components with react app. when I was trying to use a react native component from react, it has been showing an error which I couldn't resolve. I've tried to follow the instructions like adding…
Arj-One
  • 71
  • 1
  • 5
7
votes
2 answers

TypeError: Cannot read property 'cloud' of undefined

I upgraded the nx version from 12.10.0 to 14.1.9 especially to upgrade the angular version from 12.2.15 - 13.3.9. The migration worked correctly but when I do yarn nx run {home}:serve. I see this error: TypeError: Cannot read property 'cloud' of…
Indro
  • 71
  • 3
7
votes
2 answers

How to test the Swiper library with Jest in an Angular Nx repo?

I have an Nx repo with an Angular app and Jest as the test framework. The app has a component that uses the Swiper library. When trying to test the component, I get the following error messages: ● Test suite failed to run Jest encountered an…
snowfrogdev
  • 5,963
  • 3
  • 31
  • 58
7
votes
1 answer

Building an Nx lib with Rollup does not bundle required dependencies

Question I'm using the default Rollup executor to build an Nx library that I will later run in a browser-like environment. The resulting bundle cannot contain imports or requires. Running nx run ssr-bundle:build should create a single bundle…
Mike Fleming
  • 2,593
  • 4
  • 14
  • 24
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
1 answer

How to import absolute paths in a @nrwl/nx monorepo?

I'm working on a @nrwl/nx monorepo. I want to import the folders inside the project src by the absolute paths. I tried specifying the baseUrl but didn't work. The only solution worked is, adding the path to the monorepo root tsConfig.json file as…
Sennen Randika
  • 1,566
  • 3
  • 14
  • 34
7
votes
0 answers

Nx React - Proxy not working with Nx and React

I have a React application created using Nx and there I'm trying to make api calls to my dev server but getting CORS issues. So I tried setting up a proxy following this link:…
Sabu Shakya
  • 334
  • 4
  • 15