Questions tagged [nx.dev]

For questions about Nx, a suite of powerful, extensible dev tools that help you develop, test, build, and scale Angular applications with fully integrated support for modern libraries like Jest, Cypress, ESLint, and more.

Intro to Nx

Nx is a suite of powerful, extensible dev tools that help you develop, test, build, and scale Angular applications with fully integrated support for modern libraries like Jest, Cypress, ESLint, and more.

10-Minute Nx Overview (YouTube link on image below)

Nx-Dev-Tools

Philosophy

Nx is built on a technology agnostic core that maintains modular units of code and understands the dependency graph between them. Developers comprehend that your app contains two pages that each use a shared button component. Nx uses this same knowledge to provide insights and performance improvements. There's a whole ecosystem of plugins that build on this foundation.

Nx becomes more valuable as you scale, solving problems that are frustrating for small teams, but paralyzing for large teams.

Nx works especially well for monorepos. Each new app added to a monorepo provides more opportunities to share code and tooling but that often comes at the cost of a compounding slowdown in the CI pipeline. Nx ensures that adding another app to the repo does not increase the existing app’s test or build time.

Features

Test (or builds or lints) only the projects affected by a code change. Cache command output locally so that future runs on the same code happen in seconds. The paid Nx Cloud offering allows this cache to be shared across every developer in your organization. Provide a consistent syntax for executing commands. nx build my-app works no matter what framework my-app uses. Automate code modification tasks with generators. Access a thriving ecosystem of plugins from Nrwl and the community.

59 questions
0
votes
0 answers

How do I generate a publishable lib in NX without bundling and multiple entry points?

I started using NX recently. I have been trying to figure out their generators for a specific setup. I have a lib of react components that should be publishable. Due to constraints on an existing code base being ported across, I require a…
user2765977
  • 491
  • 4
  • 18
0
votes
0 answers

Nx 16 Invalid package name "@nx-cloud"

I'm getting the error Invalid package name "@nx-cloud" of package "@nx-cloud@16.0.5": name can only contain URL-friendly characters. everytime I try to install any package to my project. Is there any problem with the last version of Nx or maybe i…
Alex
  • 119
  • 1
  • 10
0
votes
1 answer

How to add a variables library to NX workspace?

I have a NX workspace with a NestJS API and an Angular client project (see folder structure). It has an api-interfaces library shared between the Angular client and the API, as appears below: How can I add another library for constants and…
Lorraine R.
  • 1,545
  • 1
  • 14
  • 39
0
votes
0 answers

Using Ng-Zorro in an NX Monorepo

I have an Angular NX Monorepo (https://nx.dev/). I want to install Ng-Zorro (https://ng.ant.design/). I have sucessfully installed it with npm, but I dont know how to import it propperly, to make it work globally.
Unknown
  • 83
  • 1
  • 9
0
votes
0 answers

AWS amplify authentication in nx mono repo

Where do I add the authentication layer in nx mono repo. I have two apps inside mono repo Nextjs Nestsjs I am confused where should I add the auth layer using amplify and which one is recommended either adding it inside nextjs or in nestjs. I see…
kittu
  • 6,662
  • 21
  • 91
  • 185
0
votes
0 answers

How to exclude stories files from building a component

We have a component library with multiple components. We have created stories for each component. if we use some other component in the stories while npm run build it is added as a dependency of the component. How to fix this issue? nx run…
simon
  • 1,415
  • 10
  • 20
0
votes
1 answer

Design structure for nextjs and nestjs inside nx monorepo with pnpm

I am planning to nextjs app on frontend and nestjs for backend inside NX monorepo using pnpm workspace. I am confused how should I design the complete folder structure. Should I use package based repo? or Should I use integrated repo? or Should I…
kittu
  • 6,662
  • 21
  • 91
  • 185
0
votes
2 answers

No metadata for "LookupType" was found. EntityMetadataNotFoundError: No metadata for "LookupType" was found

I am trying to create a backend using NestJS with nx mono repo and I am getting this error No metadata for "LookupType" was found. EntityMetadataNotFoundError: No metadata for "LookupType" was found. error detail: EntityMetadataNotFoundError: No…
Ramazan Sağır
  • 4,887
  • 1
  • 14
  • 15
0
votes
1 answer

How to import a library from another library in nx project

I have created a nextjs app using nx. In the same project, I create 2 libraries: utils-logger utils-logger-transports when I try to include utils-logger-transports in utils-logger I get cannot find "@nx-app/utils-logger-transports" module the import…
Neo
  • 115
  • 1
  • 10
0
votes
1 answer

How to do performance monitoring in react-native mini apps?

I have a react native mini app which is part of main app(react-native) created using nx.dev. Currently firebase has been added to main app which gives overall performance analytics of the app. I want to do performance monitoring(prod) specific to…
Dev AKS
  • 512
  • 1
  • 5
  • 17
0
votes
0 answers

Use AngularFire in NX Monorepo

I have a NX Monorepo having an Angular app and a NestJs app. I also have an authentication library in the libs folder. I have setup AngularFire in the app.module.ts as follows: provideFirebaseApp(() => initializeApp(environment.firebase)), …
Kelveen
  • 90
  • 7
0
votes
0 answers

Multiple index.html for one angular application - tracking codes issue

I'm working on an Angular application which is split by libraries in NX.js into countries (each country is a separate library). Business wants each country to have its own tracking codes. The application knows for which country it works based on the…
JanuszFrontEnd'u
  • 451
  • 6
  • 14
0
votes
0 answers

NX Generators - user generated lists

I'm starting to build out a design system and have used NX as a project start point. NX has a tool called Generators which allow you to define a schema. The schema can then be used within NX Console (VS Code plugin) to prompt the user to supply data…
0
votes
0 answers

node nx env vars work with serve not build

I'm assuming there's something simple I'm missing because I'm new to this tool. I'm using "nx": "14.8.2", I have apps/api/.env with NX_API_PORT=5000 This works when I use the api:serve command, but run the built code from a dev build to test it with…
Neil M
  • 171
  • 8
0
votes
0 answers

Angular Component ViewChild object is null

I have below code written in Angular 10 with Rx.js and Nxdev. I am getting object eventInfoCardStep2 & eventInfoCardStep3 as null due to which further code of downloading excel does not work. If i comment below error giving lines then file get…
Amol Pawar
  • 251
  • 1
  • 15