Cannot find tsconfig.base.json when generating a new app
See original GitHub issueCurrent Behavior
When I run nx g @nrwl/angular:app app
in my freshly created nx workspace and select SASS for stylesheets I’m getting the following error:
Cannot find base TypeScript configuration file 'tsconfig.base.json
Expected Behavior
The app gets created as expected.
Steps to Reproduce
npx create-nx-workspace@latest
with the Angular preset
nx g @nrwl/angular:app app
with SASS and routing
Failure Logs
Cannot find base TypeScript configuration file 'tsconfig.base.json'.
Environment
Globally:
@angular/cli@9.1.10
@nrwl/cli@9.5.1
nx report
in my project:
@nrwl/angular : 9.5.1
@nrwl/cli : 9.5.1
@nrwl/cypress : 9.5.1
@nrwl/eslint-plugin-nx : Not Found
@nrwl/express : Not Found
@nrwl/jest : 9.5.1
@nrwl/linter : Not Found
@nrwl/nest : Not Found
@nrwl/next : Not Found
@nrwl/node : Not Found
@nrwl/react : Not Found
@nrwl/schematics : Not Found
@nrwl/tao : 9.5.1
@nrwl/web : Not Found
@nrwl/workspace : 9.5.1
typescript : 3.8.3
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Angular Nx Nrwl - Cannot parse tsconfig.base.json
I got this error when there was a comma ',' at the end of the paths list. "@portal/*": ["apps/portal/src/app/*"], <<< REMOVE this comma....
Read more >nrwl-nx/community - Gitter
Im having issues generating a new node app in a nx workspace. Ive added @nrwl/node but when i run nx g @nrwl/node:application appname...
Read more >Documentation - What is a tsconfig.json - TypeScript
Learn about how a TSConfig works. ... The tsconfig.json file specifies the root files and the compiler options required to compile the project....
Read more >TypeScript configuration - Angular
The tsconfig.base.json file specifies the base TypeScript and Angular compiler ... and the TypeScript compiler cannot infer the type, it still generates the ......
Read more >Parsing Error: Cannot read file 'tsconfig.json' | bobbyhadz
If you got the "parserOptions.project" has been set for @typescript-eslint/parser error, create a tsconfig.eslint.json file in your root directory ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I get the same problem on Angular 10, I’m using a workspace with 4 projects, I’m trying to add a new project
ng generate application xxxx ? Would you like to add Angular routing? Yes ? Which stylesheet format would you like to use? CSS Cannot find base TypeScript configuration file ‘tsconfig.base.json’.
Dependencies I use: “@angular/animations”: “~10.0.8”, “@angular/cdk”: “^10.1.2”, “@angular/common”: “~10.0.8”, “@angular/compiler”: “~10.0.8”, “@angular/core”: “~10.0.8”,
I got the solution, for unknow reason, the upgrade from 9 to 10 did non rename tsconfig.json to tsconfig.base.json. I’ve do it myself, and then modified the variuos references in workspace. After that, adding a new project was succesful.
I was running into the same issue when upgrading from angular9 to angular10. My problem was that I only upgraded the @angular/core and forgot to upgrade @angular/cli separately. I used to --migrateOnly on the ng update which helped to fix the missing tsconfig.base.json without doing the work by hand.