-
-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat/docs: update setup nx #951
base: master
Are you sure you want to change the base?
Conversation
I cannot understand the reason why not to using Any special reason not to using the Also, you're adding another TypeScript project configuration file instead of |
After that you have to turn off option "transpileOnly": false (default nx use option "transpileOnly": true) like blow: | ||
|
||
```json filename="webpack.config.js" showLineNumbers copy | ||
const { composePlugins, withNx } = require('@nx/webpack'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This wasn't necessay in my case
After install `nestia` like above, you have to modify `project.json` on each app you use typia like below. | ||
|
||
```javascript filename="project.json" showLineNumbers copy | ||
"targets": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is necessary in your project.json inside the nestia app. And should not be removed from the documentation.
After install `nestia` like above, you have to configure tsconfig.base.json (or ts.config.json on app you use nestia) like blow. | ||
|
||
```json filename="tsconfig.json" showLineNumbers copy | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that this should be added to the documentation.
But I think it's better to recommend not having this inside the global tsconfig.base.json
but inside each tsconfig.app.json
for each nestia app inside the NX monorepo.
In some cases those plugins can interfere with Angular apps and prevent them from building if this is sets inside the tsconfig.base.json
@samchon I can reply with my own experience setting up nestia inside an NX monorepo:
The This error is not specific to NX but more to a monorepo with Angular installed (which is pretty strict on which ts version is installed). But nowadays most monorepos with Angular are NX monorepos. Maybe the issue comes from the fact that Here is the tail of the error I was facing trying to run $ npm i -D typescript@^5.6.2
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: [email protected]
npm WARN Found: [email protected]
npm WARN node_modules/typescript
npm WARN peer typescript@">=5.4 <5.6" from @angular-devkit/[email protected]
npm WARN node_modules/@angular-devkit/build-angular
npm WARN peer @angular-devkit/build-angular@">= 16.0.0 < 19.0.0" from @nx/[email protected]
npm WARN node_modules/@nx/angular
npm WARN 2 more (jest-preset-angular, the root project)
npm WARN 37 more (@angular/build, @angular-eslint/builder, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer typescript@">=5.4 <5.6" from @angular-devkit/[email protected]
npm WARN node_modules/@angular-devkit/build-angular
npm WARN peer @angular-devkit/build-angular@">= 16.0.0 < 19.0.0" from @nx/[email protected]
npm WARN node_modules/@nx/angular
npm WARN 2 more (jest-preset-angular, the root project)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: [email protected]
npm WARN Found: [email protected]
npm WARN node_modules/typescript
npm WARN peer typescript@">=5.4 <5.6" from @angular-devkit/[email protected]
npm WARN node_modules/@angular-devkit/build-angular
npm WARN peer @angular-devkit/build-angular@">= 16.0.0 < 19.0.0" from @nx/[email protected]
npm WARN node_modules/@nx/angular
npm WARN 2 more (jest-preset-angular, the root project)
npm WARN 37 more (@angular/build, @angular-eslint/builder, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer typescript@">=5.4 <5.6" from @angular-devkit/[email protected]
npm WARN node_modules/@angular-devkit/build-angular
npm WARN peer @angular-devkit/build-angular@">= 16.0.0 < 19.0.0" from @nx/[email protected]
npm WARN node_modules/@nx/angular
npm WARN 2 more (jest-preset-angular, the root project)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: [email protected]
npm WARN Found: [email protected]
npm WARN node_modules/typescript
npm WARN peer typescript@">=5.4 <5.6" from @angular-devkit/[email protected]
npm WARN node_modules/@angular-devkit/build-angular
npm WARN peer @angular-devkit/build-angular@">= 16.0.0 < 19.0.0" from @nx/[email protected]
npm WARN node_modules/@nx/angular
npm WARN 2 more (jest-preset-angular, the root project)
npm WARN 37 more (@angular/build, @angular-eslint/builder, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer typescript@">=5.4 <5.6" from @angular-devkit/[email protected]
npm WARN node_modules/@angular-devkit/build-angular
npm WARN peer @angular-devkit/build-angular@">= 16.0.0 < 19.0.0" from @nx/[email protected]
npm WARN node_modules/@nx/angular
npm WARN 2 more (jest-preset-angular, the root project)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: [email protected]
npm WARN Found: [email protected]
npm WARN node_modules/typescript
npm WARN peer typescript@">=5.4 <5.6" from @angular-devkit/[email protected]
npm WARN node_modules/@angular-devkit/build-angular
npm WARN peer @angular-devkit/build-angular@">= 16.0.0 < 19.0.0" from @nx/[email protected]
npm WARN node_modules/@nx/angular
npm WARN 2 more (jest-preset-angular, the root project)
npm WARN 37 more (@angular/build, @angular-eslint/builder, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer typescript@">=5.4 <5.6" from @angular/[email protected]
npm WARN node_modules/@angular/compiler-cli
npm WARN peer @angular/compiler-cli@"^18.0.0" from @angular-devkit/[email protected]
npm WARN node_modules/@angular-devkit/build-angular
npm WARN 5 more (@angular/build, @angular/localize, @ngtools/webpack, ...)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: [email protected]
npm WARN Found: [email protected]
npm WARN node_modules/typescript
npm WARN peer typescript@">=5.4 <5.6" from @angular-devkit/[email protected]
npm WARN node_modules/@angular-devkit/build-angular
npm WARN peer @angular-devkit/build-angular@">= 16.0.0 < 19.0.0" from @nx/[email protected]
npm WARN node_modules/@nx/angular
npm WARN 2 more (jest-preset-angular, the root project)
npm WARN 37 more (@angular/build, @angular-eslint/builder, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer typescript@">=5.4 <5.6" from @angular/[email protected]
npm WARN node_modules/@angular/compiler-cli
npm WARN peer @angular/compiler-cli@"^18.0.0" from @angular-devkit/[email protected]
npm WARN node_modules/@angular-devkit/build-angular
npm WARN 5 more (@angular/build, @angular/localize, @ngtools/webpack, ...)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: [email protected]
npm WARN Found: [email protected]
npm WARN node_modules/typescript
npm WARN peer typescript@">=5.4 <5.6" from @angular-devkit/[email protected]
npm WARN node_modules/@angular-devkit/build-angular
npm WARN peer @angular-devkit/build-angular@">= 16.0.0 < 19.0.0" from @nx/[email protected]
npm WARN node_modules/@nx/angular
npm WARN 2 more (jest-preset-angular, the root project)
npm WARN 37 more (@angular/build, @angular-eslint/builder, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer typescript@">=5.4 <5.6" from @angular/[email protected]
npm WARN node_modules/@angular/compiler-cli
npm WARN peer @angular/compiler-cli@"^18.0.0" from @angular-devkit/[email protected]
npm WARN node_modules/@angular-devkit/build-angular
npm WARN 5 more (@angular/build, @angular/localize, @ngtools/webpack, ...)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: [email protected]
npm WARN Found: [email protected]
npm WARN node_modules/typescript
npm WARN peer typescript@">=5.4 <5.6" from @angular-devkit/[email protected]
npm WARN node_modules/@angular-devkit/build-angular
npm WARN peer @angular-devkit/build-angular@">= 16.0.0 < 19.0.0" from @nx/[email protected]
npm WARN node_modules/@nx/angular
npm WARN 2 more (jest-preset-angular, the root project)
npm WARN 37 more (@angular/build, @angular-eslint/builder, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer typescript@">=5.4 <5.6" from @angular/[email protected]
npm WARN node_modules/@angular/compiler-cli
npm WARN peer @angular/compiler-cli@"^18.0.0" from @angular-devkit/[email protected]
npm WARN node_modules/@angular-devkit/build-angular
npm WARN 5 more (@angular/build, @angular/localize, @ngtools/webpack, ...)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: [email protected]
npm WARN Found: [email protected]
npm WARN node_modules/typescript
npm WARN peer typescript@">=5.4 <5.6" from @angular-devkit/[email protected]
npm WARN node_modules/@angular-devkit/build-angular
npm WARN peer @angular-devkit/build-angular@">= 16.0.0 < 19.0.0" from @nx/[email protected]
npm WARN node_modules/@nx/angular
npm WARN 2 more (jest-preset-angular, the root project)
npm WARN 37 more (@angular/build, @angular-eslint/builder, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer typescript@">=5.4 <5.6" from @angular/[email protected]
npm WARN node_modules/@angular/compiler-cli
npm WARN peer @angular/compiler-cli@"^18.0.0" from @angular-devkit/[email protected]
npm WARN node_modules/@angular-devkit/build-angular
npm WARN 5 more (@angular/build, @angular/localize, @ngtools/webpack, ...)
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/typescript
npm ERR! dev typescript@"^5.6.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer typescript@">=5.4 <5.6" from @angular/[email protected]
npm ERR! node_modules/@angular/compiler-cli
npm ERR! dev @angular/compiler-cli@"18.2.1" from the root project
npm ERR! peer @angular/compiler-cli@"^18.0.0" from @angular-devkit/[email protected]
npm ERR! node_modules/@angular-devkit/build-angular
npm ERR! dev @angular-devkit/build-angular@"18.2.1" from the root project
npm ERR! 1 more (@nx/angular)
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR!
npm ERR! For a full report see:
npm ERR! /Users/baptistemahe/.npm/_logs/2024-10-29T10_13_07_293Z-eresolve-report.txt
npm ERR! A complete log of this run can be found in: /Users/baptistemahe/.npm/_logs/2024-10-29T10_13_07_293Z-debug-0.log
Command failed: npm i -D typescript@^5.6.2
NX monorepos works with multiples tsconfig.json, here is a small breakdown of them:
Then there is the same tsconfig(.app | .spec).json inside each lib (./libs/lib-1). Regarding the Nestia setup inside my NX monorepo I have had some issues adding the transform plugins directly inside the |
Update docs setup nestia with nx