423
questions
3
votes
0
answers
42
views
Buildable libraries cannot import or export from non-buildable librarieseslint@nx/enforce-module-boundaries
I am working with an Angular monorepo using Nx, and I've run into an issue while trying to build a component library that's set up to be publishable to npm. My project structure is as follows:
nx-...
0
votes
1
answer
58
views
Tailwind CSS IntelliSense doesn't suggest the CSS classes in NX monorepo anymore
My NX monorepo workspace is based on Angular, and I have tailwind.config.js for my apps. Everything was cool, and Tailwind CSS IntelliSense extension was suggesting the available CSS classes in my ...
0
votes
0
answers
34
views
Error: [readCachedProjectGraph] ERROR: No cached ProjectGraph is available
I just created a project using nx 19.5.7 and after that I tried to serve my app and I ran into with this problem:
Maybe problem in deprecated version of CLI
My package.json:
{
"name": &...
0
votes
0
answers
39
views
How to build a Git submodule as a standalone project in an NX workspace?
I'm working on an Angular project using NX and have a Git submodule located in the root directory of my NX workspace. I want to build this submodule as a standalone project and have the output placed ...
1
vote
0
answers
56
views
Nx Angular Server Side Rendering
After I setup SSR for my Angular 18 project, it properly worked. The issue lies on prerender option in project.json. When I change it to false, the project builds without any problem. But when it's ...
0
votes
1
answer
71
views
Unable to easily create prereleases using Nx
I'm struggling figuring out how to succinctly get prereleases to work properly using Nx. If I run the command:
npx nx release version --projects myPackage --specifier prerelease --preid alpha
It will ...
0
votes
0
answers
56
views
How Can I Display All Lint Errors and Warnings in VS Code Without Opening Each File?
When I run nx run-many -t lint --all, I get a lot of warnings and errors in the terminal.
Is there a way to display all these errors and warnings in the Problems section of VS Code?
Currently, they ...
0
votes
0
answers
189
views
Nx Release working locally but not in github actions
Currently when I run yarn nx release locally i see the changes since the last tag picked up and a changelog file is written like below.
NX Running release version for project: my-project
my-...
0
votes
0
answers
61
views
How do I create seperate env for each node service in a nx integrated monorepo?
I'm trying to build a nodejs (Express) monorepo using nx, and here I'm facing issues with env variables. I want to use the seperate env files for each service in a monorepo but it's coming undefined ...
2
votes
0
answers
94
views
Why NX Eslint enforceBuildableLibDependency rule exists
So NX has some of its own eslint rules nx eslint rules docs, what is not immedaitly clear is one of those rules 'enforceBuildableLibDependency'. Why you have this implication/restriction for buildable ...
1
vote
1
answer
83
views
Migrate from Nx14 to Nx16, NextJs, TawilwindCSS and typescript
I am trying to migrate my project from Nx14 to Nx16 in order to use Node20.
I made the migration manual from Nx14 to Nx15 and then Nx16 as suggested in Nx docs.
while building the project pass ...
1
vote
0
answers
111
views
how to determine which dependencies are used in which project in nx
I am learning more about the monorepo and nx.
in nx, they by default have project.json instead of package.json and reading project.json doesn't tell much.
In this repo I am trying to understand what ...
0
votes
0
answers
31
views
Is there a way to simplifies NX Angular architecture?
We've implemented for few months NX in our Angular app. We really appreciate the benefits, however I think the architecture is far too deep for the libs:
|_ front
| |_ ...
| |_ apps
| | |_ myApp
| ...
1
vote
1
answer
900
views
Nx Version > 18: How to install NX globally on Windows 11 Machine ? what is the difference between npx nx --version and nx --version command?
In windows 11 command prompt, C:\users\EmployeeId
npx nx --version
Local: v18.2.4
Global: Not found
nx --version
Local: v18.2.4
Global: 16.9.1
npx list -g --depth=0
@nx18.2.4
@angular/[email protected]
...
2
votes
1
answer
704
views
Has anyone else experienced the: 'NX The externalDependency 'webpack-cli' for 'app' could not be found' error?
I have been using @nx v18.1.2 for a while now (mostly experimenting at the moment), but every once in a while, I will see the following error message when building nestjs or angular apps in particular:...
0
votes
1
answer
254
views
How to use absolute imports of folders inside any app with nx monorepo
I'm migrating my company frontend project to a mono-repo with Nx mono-repo tool, and have the following structures -
apps/pay-platform - where our main app exists.
packages/sk-ui - design system.
Now, ...
2
votes
1
answer
458
views
Error while trying to build the NX dev container
I'm trying to contribute with NX project, but I;m getting an error on the dev container while trying to install the dependencies.
VSCode dev container extension build the container, and runned the ...
0
votes
0
answers
192
views
NX Library re-usability in multiple projects?
We have decided to use NX in our startup to build a large scale enterprise software with Angular and NestJS, and our main idea was to construct multiple libraries that we can very easily re-use and ...
0
votes
0
answers
86
views
Is there a way to enforce Nx module boundaries at compile time?
My app is using Nx Module Boundaries, the issue is that it is only enforced during linting.
Running at compile time would be preferred.
Only idea so far:
Add lint commands to all of custom package....
4
votes
1
answer
3k
views
should .nx be in git ignore? (nx monorepo)
I recently upgraded my Nx monorepo workspace from v13 to v16 using the nx migrate command and did the required modifications manually. The command added an .nx folder with a cache subfolder:
The nx ...
0
votes
0
answers
108
views
Nx assets path ambiguity in development vs build mode
I'm writing a report feature using Nx + nestjs. I have to put pictures (logos etc.) in this generated document.
The ambiguity I face is in accessing assets path. Below works in one environment but not ...
2
votes
0
answers
447
views
How to change tsconfig.json inside NX Vite library/app builds
Have someone found a way to customise the tsconfig.json for NX project build. When using Vite as bundler?
Here is the problem below is a standart NX(18.0.4) vite.config.ts for library. When you do 'nx ...
0
votes
1
answer
107
views
NX Check Module Boundaries "CONFIGURED undefined"
I recently updated the following packages and did the necessary migrations:
@nrwl/js: 15.3.0 --> 18.0.4
@nrwl/workspace 15.3.0 --> 18.0.4
nx 15.3.0 --> 18.0.4
@nx-dotnet/core 1.22.0 -> ^2....
2
votes
0
answers
389
views
NX - how can I build and serve node application that depends on ESM libs
Background
I've got an NX workspace with a react front-end and an express back-end. I want to add some dependencies to the back-end application but am having trouble adding dependencies that are ESM ...
3
votes
3
answers
603
views
How to fix Angular NX project NG0203 error
I am struggling with the NG0203 error, while my colleagues are able to serve the project without any problem. I tried to upgrade and downgrade the versions of both Angular and Nx, but it did not work. ...
3
votes
0
answers
390
views
How to exclude a specific folder within an Nx monorepo library during 'nx affected:test' command
Problem:
I work in an Nx monorepo with multiple apps and libraries. One of my libraries (lib-b) has an assets folder that contains non-testable resources. When I make changes inside the assets folder ...
0
votes
0
answers
26
views
Can I contribute a full Nx executor for the Serverless framework?
I'm currently working on a full support for the Serverless Framework Nx executor, and I have 2 options.
Publish it as a community standalone package
Contirbute to your Repository directly
To clarify ...
1
vote
2
answers
772
views
How to set two 'projects' build config in Nx workspace project.json similar to angular.json?
Here angular.json file has two project configs:
one for single-spa, and another config for local dev build.
See image and git link:
https://github.com/Abdelrahman-H-Mahmoud/single-spa-demo/blob/main/...
0
votes
0
answers
114
views
How to use env variables with nx expo?
I have created this file : .local.env in the my-app/apps/app-test directory. The file has the the following content for environment variable:
NX_API_URL=https://www.test.com/test
How do I make this ...
1
vote
1
answer
75
views
Generating component without spec.ts in Angular within nx workspace
I want to do it for the entire project, but unlike an Angular CLI project, there is no angular.json file, only a project.json one.
So, according to this answer, I could add some config somewhere to ...
0
votes
0
answers
251
views
NX param forwarding to 'dependsOn' target
I have an Angular app hosted in an NX project. There is a custom executor which performs an 'auth' step before the site is served, so the project.json looks something like this:
"serve": {
...
0
votes
0
answers
169
views
Does Nx support caching symbolic links?
I have a Nx monorepo project which has a node_modules/.bin folder with content like this:
drwxr-xr-x 84 demo staff 2688 Dec 8 13:29 .
drwxr-xr-x 997 demo staff 31904 Dec 8 13:29 ..
lrwxr-xr-...
1
vote
0
answers
264
views
Nx publishable library: 'rootDir' is expected to contain all source files after running build
I created a publishable Nx library that has a project.json like this (only build target):
{
"name": "@pace-io/myLib",
"$schema": "../../node_modules/nx/schemas/...
0
votes
1
answer
1k
views
Run nx test for chosen file paths
My project has thousands of test files and I wanted to make a dynamic mechanism of splitting those files on Gitlab CI using parallel jobs.
I wrote a script that splits *.spec.ts(x) files into groups ...
0
votes
0
answers
256
views
NX Based React Project is not loading internal libraries
I have a project that was worked by someone else on NX 15 I tried to run it but had many issues So I created a new NX 17 Project and migrated all the code to the new code base (NX 17). But when I am ...
0
votes
1
answer
255
views
how to test @mdx-js/mdx with jest (transformIgnorePatterns not working on 'develop' module)
My ultimate goal is to be able to write tests in Jest that can import from @mdx-js/mdx, which is an ESM module, and since the library package under development is configured for commonsjs, I am using ...
0
votes
0
answers
302
views
How to use NX like Lerna?
my goal is to create Monorepo. I am an Angular Developer, so I expect to start my first project as Angular. But in the future I expect other developer to may use React/Next.js. The point is: I do not ...
0
votes
1
answer
140
views
Is NX package-based monorepo do not work with Angular?
My goal is to create module federation example with package-based monorepo angular. Package-based monorepo because I am expecting this scenario:
/checkout with Angular 15.
/product with Angular 16.
...
1
vote
1
answer
5k
views
Error: Could not find 'nx' module in this workspace
In trying to build an app I am getting the following error:
Compiling with Angular sources in Ivy partial compilation mode. Could not find 'nx' module in this workspace. TypeError: (intermediate value)...
0
votes
0
answers
588
views
How do I configure a nx build to generate a stacktrace?
I am using the Nrwl nx console in Visual Studio Code. When I use the build command in the nx console I get the following error.
Building Angular Package
NX Entry point "name-of-the-library&...
0
votes
1
answer
241
views
Do Shared Components only work with matching framework in NX?
Looks like in nx you can make shared libraries. I have seen angular, react, web ui libraries. However, does the framework/library have to be compatible? Can a react component library export components ...
0
votes
0
answers
132
views
nx nrwl mono repo doesn't use build results
I've had doubt about if nx is helping with build effort and wanted to prove it.
I've created 4 packages, each different build engine. I made one the package to have a plugin to change the build result ...
1
vote
0
answers
102
views
Unable to use Angular Core library when using nx
I am trying to migrate my app to nx app. I am almost at the end, but the problm is that whenever I add Angular module or Angular component to that library, I get following error:
ESLint: Buildable ...
1
vote
1
answer
578
views
I'm getting "There was an error creating glob patterns, returning an empty array" error in NX monorepo
I have generated a lib (Angular component) but then decided to delete it, and removed all of its references. Also removed its path alias in tsconfig.base.json file, but now my Tailwindcss doesn't work ...
2
votes
0
answers
617
views
How to use nx affected for multiple targets with different args for each?
In our project we use an nx monorepos for multiples angular apps.
I tried this command :
nx affected -t lint build test --base=origin/master --head=HEAD --parallel=3 --runInBand --logHeapUsage --...
0
votes
0
answers
151
views
Do NOT add Storybook to peerDependencies - Nx Angular (ng-packagr)
Background:
I have an Nx workspace with a single Angular library (and its e2e application). The library exports UI Components as separate entry points as well as assets (e.g. stylesheets) via ng-...
1
vote
0
answers
1k
views
Error: Unable to resolve @nrwl/web:dev-server
how do i fix this error when i try to run my script to start my app i get the error Cannot find executor 'dev-server' with the path to the executor.json
I tried running yarn dev:ess but i get the ...
1
vote
2
answers
876
views
How to generate a CSS, SASS, and vanilla JS library in an Nx Integrated monorepo?
I was wondering how to generate a CSS, SASS, and vanilla JS library in an Nx Integrated monorepo?
Well, my apps are in Angular, and my 'feature' tagged libs are also Angular components. So far, so ...
0
votes
1
answer
553
views
How to generate Angular App shell in an integrated Nx monorepo workspace?
I think the question is self-explanatory... Is there a way to generate Angular App shell in an integrated Nx monorepo workspace?
I know that if we call, let's say, nx g @nx/angular:service my-service -...
6
votes
1
answer
3k
views
Nx no longer supports the v2 format of angular.json
I am trying to upgrade angular (v15) and nx (v16) in my project, but the issue that I am running into is when I start my project NX throws an error:
> NX angular.json format is incorrect
Nx ...