[bug] [Typescript 3.9] Cannot read property 'paths' of undefined
See original GitHub issueCurrent Behavior
Typescript 3.9 add tsconfig.base.json instead ts.config.json
Expected Behavior
Change tsconfig.json to tsconfig.base.json
Steps to Reproduce
- Run new project
- Update project to Angular 10.0.1
- add lib by nx g @nwrl/angular
- we have an error
Failure Logs
Cannot read property ‘paths’ of undefined
Environment
“dependencies”: { “@nrwl/angular”: “9.4.5”, “@angular/animations”: “^10.0.1”, “@angular/common”: “^10.0.1”, “@angular/compiler”: “^10.0.1”, “@angular/core”: “^10.0.1”, “@angular/forms”: “^10.0.1”, “@angular/platform-browser”: “^10.0.1”, “@angular/platform-browser-dynamic”: “^10.0.1”, “@angular/router”: “^10.0.1”, “core-js”: “^3.6.5”, “rxjs”: “~6.5.5”, “zone.js”: “^0.10.3” }, “devDependencies”: { “@angular/cli”: “10.0.0”, “@nrwl/workspace”: “9.4.5”, “@types/node”: “~14.0.14”, “dotenv”: “8.2.0”, “ts-node”: “~8.10.2”, “tslint”: “~6.1.2”, “eslint”: “7.3.1”, “typescript”: “~3.9.5”, “prettier”: “2.0.5”, “@angular/compiler-cli”: “^10.0.1”, “@angular/language-service”: “^10.0.1”, “@angular-devkit/build-angular”: “0.1000.0”, “codelyzer”: “~5.2.2”, “jest-preset-angular”: “8.2.1”, “@nrwl/jest”: “9.4.5”, “jest”: “26.1.0”, “@types/jest”: “26.0.3”, “ts-jest”: “26.1.1”, “cypress”: “^4.9.0”, “@nrwl/cypress”: “9.4.5” }
Issue Analytics
- State:
- Created 3 years ago
- Reactions:12
- Comments:27
@FrozenPandaz Sorry to reply in this issue after it has been closed. I have found the solution. You were right, i created my workspace like 4 months back, that time the base/root tsconfig file named it as
tsconfig.json
. And i believe from NX 10, it was renamed totsconfig.base.json
. That was the cause of the problem.So for anyone having the same issue, rename your root
tsconfig.json
totsconfig.base.json
and rename all the other tsconfig files which extends from root tsconfig.Thanks.
just adding the following on the tsconfig.json:
"compilerOptions": { "baseUrl": ".", "rootDir": "." },
worked for me… as a temp solution.