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

How to set NGRX state before a cypress e2e test?

I am trying to write e2e tests for one of my UI pages which depend on NGRX state. Not sure how to set the NGRX state before starting the test. Could you please help me with this?
CodeBuggy
  • 429
  • 5
  • 18
0
votes
1 answer

Best practice for providing reusable singleton services in multiple NgModules (and specifically in a monorepo, Nrwl Nx style)

We have a mono repo and using Nx layout with /libs. A lot of the ....service.ts (services) can be reused in multiple places. Here is the question... These services are mostly fetches from the REST API and therefore designed to be stay singletons.…
user1902183
  • 3,203
  • 9
  • 31
  • 48
0
votes
2 answers

How to share library within other library nx (nrwl) - singlerepo

Folder structure: --shared ---components ---states ---api-interfaces I would like to use @lib/api-interfaces within states and components instead: relative path: ../../../foo/xxx/bar/{...}.ts;. Is there a way to do it?
hackp0int
  • 4,052
  • 8
  • 59
  • 95
0
votes
0 answers

Cypress Integration with nrwl/nx angular project

I could really use some help here, we have been in this for a few days now. We have an angular 7 nx project, currently there is one app and one e2e app. We would really like to start using cypress but we are having trouble doing so. The main issue,…
Benny Afriat
  • 393
  • 1
  • 3
  • 12
0
votes
1 answer

Nrwl NX: Provide style variables from apps to libs

I'll get down straight to the idea: I want my lib's components to not have specific colors. So I style my component in the following way: h1 { color: $primary; } Note that I do not declare $primary variable anywhere in the lib. I do this in my…
Boris
  • 4,944
  • 7
  • 36
  • 69
0
votes
1 answer

Can I use NX CLI for both Angular and React apps in one Nx workspace?

I tried the below, but got some errors. create a Nx workspace: npx create-nx-workspace@latest myworkspace, and select to use Angular CLI generate angular app: yarn add --dev @nrwl/angular && yarn ng g @nrwl:angular:app myapp-ng I can see a…
Roy Ling
  • 1,592
  • 1
  • 14
  • 31
0
votes
1 answer

Angular 8 material design only after server restart

I got a problem while learning Angular 8 with material design. I copy pasted a material design example from here https://material.angular.io/components/input/overview, it looks like this:
eXodiquas
  • 300
  • 2
  • 10
0
votes
2 answers

ng serve: how to change inspector port?

When I start ng serve server on the command line it fails with: Starting inspector on localhost:7777 failed: address already in use This is expected, because there is really already another instance running. So how can I change the inspector port…
TmTron
  • 17,012
  • 10
  • 94
  • 142
0
votes
1 answer

nrwl/nx How to publish a NestJs library with npm?

I need some help, by creating a publishable nestjs library with nx. I've read a lot of documentations, but nothing helps. I wrote a nestjs library in a NX monorepository. Now i want to publish only this library on NPM, but i dont know how. On…
Lukas
  • 155
  • 1
  • 2
  • 7
0
votes
1 answer

Angular Nrwl Nx Data Persistence with non-class Actions

Is it possible to use non-class-based actions with Nx Data Persistence? I could not find anything in the docs. This here is what I tried so far: run: (action, state) => { const booking: Booking = action.booking; return…
Phil
  • 7,065
  • 8
  • 49
  • 91
0
votes
1 answer

nrwl nx React tutorial confusing

Following the Getting Started docs for nrwl react and the tutorial. The docs have you run specific commands and then show the folder structure that should be created. I am not seeing the same folder structure. (and some additional…
David Martin
  • 513
  • 6
  • 20
0
votes
1 answer

Creating react app in nx workspace fails - yarn not found

I am following the NX tutorial (here) about creating react app but I get an error: ✔︎ tracking-platform (master) ✗ npm run nx -- generate @nrwl/react:application todos > tracking-platform@0.0.0 nx /home/kklimczak/workspace/tracking-platform > nx…
kklimczak
  • 623
  • 4
  • 10
0
votes
1 answer

Nx cypress - adding custom plugin for visual testing

I am trying to set up a one of visual testing plugin from cypress https://docs.cypress.io/plugins/#visual-testing but in nrwl nx monorepo. I follow the guide from https://github.com/meinaart/cypress-plugin-snapshots but can't make it work. Actual…
0
votes
1 answer

Using GraphQl and MongoDB schema as library in NRWL/NX Enviornment

I am fairly new to the NRWL/NX world. What I am trying to accomplish here is, to use the GraphQL (with the MongoDB) for the API. In past, I've created the GraphQL project with MongoDB in a non-NRWL environment. However since now we have multiple…
NBaua
  • 583
  • 4
  • 16
  • 33
0
votes
1 answer

Adding React to a workspace failed, EACCES: permission denied, mkdir '/home/mint/.cache/Cypress'

I am trying to add @nrwl/react on en empty nx workspace. So i am creating an empty nx workspace with : yarn create nx-workspace . Then when i do a yarn ng add @nrwl/react to add React i have this error (even with sudo) : > cypress@3.3.1…
Anatole Lucet
  • 1,603
  • 3
  • 24
  • 43
1 2 3
53
54