All Questions
Tagged with monorepo nomachine-nx
41
questions
7
votes
0
answers
2k
views
how can i use absolute paths in same library in NX monorepo
I am working on Nx monorepo. We have 5 library and are using imports like this '../../components/Button' in library. but instead of this, we want to use absolute imports.
For example:
there are 2 ...
6
votes
2
answers
9k
views
How to share SASS styles between libs inside my NX monorepo?
I'm trying to build a component library for angular and react. That's why I want to use the same styles(sass) for both libs. I created a separate folder for my styles and included my main sass inside ...
5
votes
6
answers
10k
views
NX ERROR - Nx failed to install dependencies
I'm not sure what could be going wrong and the error message is blank whenever I open it. I've searched online for fixes but nothing has helped hence I'm asking here.
My version of node is: v16.1.0
My ...
5
votes
1
answer
4k
views
How to build Nx monorepo apps in Gitlab CI Runner
I am trying to have a gitlab CI that performs the following actions:
Install yarn dependencies and cache them in order to don't have to yarn install in every jobs
Test all of my modified apps with ...
4
votes
2
answers
983
views
running ionic generate page inside NX monorepo angular
i am inside a NX monorepo, its working on angular.
I have installed Ionic as pre instructions given on link. Ionic is working ok, But i cant use commands like ionic generate page --project=sales-app, ...
3
votes
4
answers
5k
views
How to host assets with Module Federation on Angular and Nx monorepo
I need to make assets (png, svg images, fonts) from Angular remote applications available also in host applications of Webpack Module Federation.
Below are long steps to reproduce - not necessary to ...
3
votes
0
answers
1k
views
How to share tailwindcss preset in nx monorepo
I'm trying to share tailwindcss preset between both react and react-native apps in tx monorepo. Preset is stored in .js file located in root nx library named "tailwind".
While importing ...
3
votes
1
answer
2k
views
Nx workspace - Shared lib with tailwindcss and react
I struggled in setting this up, so I thought I would share my Knowledge.
Basically, I wanted to have a UI Kit / Component library with NX that could be shared with for example a webapp with react and ...
3
votes
3
answers
2k
views
How do I generate a NestJS resource in an app within an Nx workspace using the nx cli?
I want to generate a NestJS resource in my new nestjs app within an Nx workspace, similar to the way you would in a solo NextJS app using the nest generate cli command. Using the nx generate command I ...
2
votes
1
answer
2k
views
Run a single typescript file using ts-node inside an NX monorepo
I am trying to run a single TypeScript file inside an NX monorepo using ts-node but I keep getting errors when importing local modules.
npx ts-node apps/sanity/src/sanity.ts
(node:22816) Warning: To ...
2
votes
1
answer
183
views
How import pdf files from assets folder in Nx monorepo ( react )
I have an nx monorepo with a project that has a folder of assets with pdf files inside, but for some reason I can't import them because the environment just doesn't see them. What do I need to do to ...
2
votes
0
answers
216
views
Having issue with react-native-paper in react-native-web platform
I have followed react native paper documentation for User on the Web.
When I try to serve it gave me an error
https://callstack.github.io/react-native-paper/using-on-the-web.html
While try to run it ...
1
vote
1
answer
2k
views
How to use React-Native components in a Nextjs App inside an Nx monorepo
I am trying to use React Native components inside an Nx monorepo.
When I run the Nextjs app, it compiles successfully:
info - automatically enabled Fast Refresh for 1 custom loader
event - compiled ...
1
vote
2
answers
839
views
How to setup monorepo for vue ecosystem with NX?
is there a way to setup monorepo tools like NX with vue3?
I've seen the unofficial repo that can be added to NX for handling vue, but the support is not that great. Is there any other package that can ...
1
vote
0
answers
385
views
error TS6059: ' is not under 'rootDir', 'rootDir' is expected to contain all source files
I'm experiencing issues with deploying an application I'm working on with Angular and NX. The issue I'm facing is that I don't quite grasp how the application should be configured to avoid this error. ...
1
vote
0
answers
398
views
Nx monorepo with react host and mixed angular and react microfontends (MFE) using module federation
We have an Nx mono repo with a react host app. Not all teams work in this repository, especially some using angular. I've seen StackOverflow Q/A and other articles on importing angular micro-frontends ...
1
vote
0
answers
212
views
Nginx, Docker and Nx Monorepo with one port - 502 Gateway
i have problem with setup my nginx. I was able to start all "apps/" modules inside docker.
But reverse proxy still doesn't work as expected.
Story:
Nx directories:
/ apps
/ test-1 (Nuxt)
...
1
vote
1
answer
929
views
NX node application: generated dist/.../package.json file does not include a "dependencies" section at all
I have a NX monorepo
I created a new CLI node.js app called nodeapp1 app using command:
nx g @nrwl/node:application nodeapp1
When running nx serve nodeapp1 -or- nx build nodeapp1, it does generate a ...
1
vote
1
answer
2k
views
ERROR [I18nService] parsing translation error Error: ENOENT: no such file or directory, stat using | monorepo | nx | nestjs
I have a problem about using i18n with Nest.js with mono repo(nx). I tried so much things but I can't solve the problem. Compiler is not export the i18n folder to dist directory. I am sharing some ...
1
vote
1
answer
2k
views
How to make a library that has been generated with nx, buildable?
I generated a library with nx but i forgot to make it buildable.
I have no clue what to di to fix this
1
vote
0
answers
1k
views
Storybook static build asset issue
I have an issue only when I generate the static bundle of my storybook
I work with a monorepo (using nx) and I have a scss variable : $icon-path: "/assets/images";
I use this variable to ...
0
votes
1
answer
5k
views
Why does this error appear when running Nrwl nx cli?
I've been trying to learn and use the nwrl nx framework in creating a new mono repo with angular applications. However, when trying to use the nx cli for any commands, I get the following error:
...
0
votes
2
answers
1k
views
JEST: unit tests are successful although an unknown component is used
Why does the unit test not fail locally even though a component is used that does not exist but in bitbucket pipeline it does?
To demostrate the problem I have created a new nx workspace (Repository).
...
0
votes
1
answer
2k
views
How to change the template file(s) for an existing nx schematic
I started to use https://nx.dev/ recently to reorganize an existing monorepo with multiple react frontends and redux state management.
nx provides the ability to create new redux slices out of the ...
0
votes
0
answers
13
views
Is there a way to configure Nx to always run tasks from the project root rather than workspace root?
I have a mixed repo with some non-JS projects that use make for running tasks. I am integrating these into an Nx monorepo by simply defining the tasks in each project.json using the generic nx:run-...
0
votes
0
answers
27
views
Nx monorepo build pulling in packages from other folders
I have a typescript monorepo using nx. I have a /frontends folder and a /services folder each with a couple of project folders, and the build all works correctly. I use TypeScript and node 20. I use ...
0
votes
0
answers
43
views
How to create custom package.json in NX preset
I am creating a new NX preset which is like a scaffold to generate new workspaces with NX.
The problem is, when NX is running the npm install command, my custom package.json is still not available it ...
0
votes
0
answers
271
views
How to build individual projects in a monorepo without affecting other projects (Angular, NX)
I am working on an internal Angular project where I need to expose multiple services within a single dashboard.
The solution involves having one project act as the outer layout, and multiple projects ...
0
votes
0
answers
95
views
How do you bundle a nonpublishable library with a publishable library in an Nx monorepo?
I want to use an Nx monorepo to break a published package's implementation into multiple modules. My monorepo contains one publishable library, the public interface. This library depends on multiple ...
0
votes
0
answers
41
views
Does NX use `package.json` file for cache key calculation?
I noticed that changes in the root's package.json doesn't burst the cache of my package even though the library is directly used there. The monorepo is generated using standard generators and no ...
0
votes
0
answers
66
views
How to run Docker using shared packages?
Firstly, the development environment is as follows:
Using Yarn Berry for zero-installation
Managing a monorepo with Nx
The folder structure looks like this.
Given such interdependent monorepos, how ...
0
votes
0
answers
102
views
What commands do I use and what files do I edit to configure a new nx workspace in a directory structure of existing nodejs/.NET applications?
Background:
I've been following multiple nx videos and installation guides which claim to be simple with npx add-nx-to-monorepo. The guides then talk about editing workspace.json, which is deprecated, ...
0
votes
0
answers
232
views
how to configure NX buildable libs with host app only, instead of the 1st remote
I have setup the NX monorepo with micro-frontends.
I have array of applications such as: app1, app2, app3, ..., app7.
I also created two buildable libraris: 1. common (non ui shared logic) 2. common-...
0
votes
0
answers
409
views
NX Monorepo not updating libraries with `nx-migrate`
I have created sample nx-monorepo for angular using v12. The original application is a polyrepo with angular cli using old version of lerna, so I am trying to upgrade it to 16 and want to go forward ...
0
votes
0
answers
392
views
Module import errors in ESLint from NX
I am configuring a monorepo with Angular and other tools using NX. I have managed to run the applications correctly and now I am trying to get the Linter working.
This is the configuration of the ...
0
votes
1
answer
773
views
How to load host application with all it's remotes in NX Monorepo?
To start host with remotes I use --devRemotes option. For example:
nx serve my-console --devRemotes=my-assets,my-dashboard
Is there a way to serve start my-console with all of it's remotes in "...
0
votes
1
answer
689
views
How do i move an nx library without causing this error?
Created a fresh nx project with an angular app and a lib, tried every variation of the nx move command to try and move the lib but they all result in the same error stating it can't find the projects ...
0
votes
0
answers
1k
views
Docker + PNPM + NX issue
I have a troubleshoot with Docker and a monorepo based on PNPM Workspace + NX.
It simply doesn't compile.
I get the message :
=> ERROR [ 9/12] RUN pnpm build-schema ...
0
votes
0
answers
332
views
Create new Nx Mono-repo for existing Angular 14 and Vue3(Vite) apps
Is it possible to create a new Nx mono-repo for two existing Apps, one in Angular 14 and the other in Vue3 using Vite?
Another bonus would be to have an Asp.Net application also in the same mono-repo.
...
0
votes
2
answers
276
views
Property 'trace' does not exist on type 'typeof NxWelcomeService'.ts(2339)
I am migrating my project to Nx Monorepo and it happens that libraries that worked fine in my project outside of Nx do not recognize public methods here.
It doesn't happen only with libraries, I have ...
0
votes
1
answer
618
views
NestJS Configuration in a Nrw Nx Monorepo?
I've just started using Nx and I'm moving my existing project over to a Monorepo environment.
The problem I have is with the NestJs app. For some reason the configuration file never gets read. I've ...