Migration from 1.10.0 to 2 fails because it could not parse tsconfig.base.json
See original GitHub issueDescribe the bug
❯ ng update apollo-angular --migrate-only --from 1.10.0
Using package manager: 'npm'
Collecting installed dependencies...
Found 98 dependencies.
** Executing migrations of package 'apollo-angular' **
❯ Update to Apollo Angular 2 and Apollo Client 3
✖ Migration failed: Couldn't parse tsconfig.base.json!
See "/private/var/folders/yz/pntm5xh11mjb3ckzvf10ql180000gn/T/ng-a1WVn4/angular-errors.log" for further details.
[error] Error: Couldn't parse tsconfig.base.json!
at Object.getJsonFile (PROJECT_ROOT/node_modules/apollo-angular/schematics/utils/file.js:29:15)
at PROJECT_ROOT/node_modules/apollo-angular/schematics/migrations/v2.js:79:42
at Generator.next (<anonymous>)
at PROJECT_ROOT/node_modules/apollo-angular/node_modules/tslib/tslib.js:114:75
at new Promise (<anonymous>)
at Object.__awaiter (PROJECT_ROOT/node_modules/apollo-angular/node_modules/tslib/tslib.js:110:16)
at migrateTsConfig (PROJECT_ROOT/node_modules/apollo-angular/schematics/migrations/v2.js:69:20)
at MergeMapSubscriber.project (PROJECT_ROOT/node_modules/@angular-devkit/schematics/src/rules/call.js:75:24)
at MergeMapSubscriber._tryNext (PROJECT_ROOT/node_modules/@angular-devkit/schematics/node_modules/rxjs/internal/operators/mergeMap.js:69:27)
at MergeMapSubscriber._next (PROJECT_ROOT/node_modules/@angular-devkit/schematics/node_modules/rxjs/internal/operators/mergeMap.js:59:18)
at MergeMapSubscriber.Subscriber.next (PROJECT_ROOT/node_modules/@angular-devkit/schematics/node_modules/rxjs/internal/Subscriber.js:66:18)
at MergeMapSubscriber.notifyNext (PROJECT_ROOT/node_modules/@angular-devkit/schematics/node_modules/rxjs/internal/operators/mergeMap.js:95:26)
at InnerSubscriber._next (PROJECT_ROOT/node_modules/@angular-devkit/schematics/node_modules/rxjs/internal/InnerSubscriber.js:28:21)
at InnerSubscriber.Subscriber.next (PROJECT_ROOT/node_modules/@angular-devkit/schematics/node_modules/rxjs/internal/Subscriber.js:66:18)
at MergeMapSubscriber.notifyNext (PROJECT_ROOT/node_modules/@angular-devkit/schematics/node_modules/rxjs/internal/operators/mergeMap.js:95:26)
at InnerSubscriber._next (PROJECT_ROOT/node_modules/@angular-devkit/schematics/node_modules/rxjs/internal/InnerSubscriber.js:28:21)
To Reproduce Steps to reproduce the behavior:
Expected behavior
Environment:
@apollo/client
: 3.1.3apollo-angular
: 2.0.3graphql
: 15.3.0@angular/core
: 10.0.10@angular/cli
: 10.0.6typescript
: 3.9.7
Yes it is latest because I did
npm up
but now want to migrate manually.
Additional context
tsconfig.json
/*
This is a "Solution Style" tsconfig.json file, and is used by editors and TypeScript’s language server to improve development experience.
It is not intended to be used to perform a compilation.
To learn more about this file see: https://angular.io/config/solution-tsconfig.
*/
{
"files": [],
"references": [
{
"path": "./tsconfig.app.json"
},
{
"path": "./tsconfig.spec.json"
},
{
"path": "./cypress/tsconfig.json"
},
{
"path": "./tsconfig.worker.json"
}
]
}
tsconfig.base.json
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"outDir": "./out-tsc/dist",
"strict": true,
"noImplicitAny": true,
"noImplicitReturns": true,
"noImplicitThis": true,
"noFallthroughCasesInSwitch": true,
"forceConsistentCasingInFileNames": true,
"strictPropertyInitialization": false,
"strictNullChecks": true,
"sourceMap": true,
"declaration": false,
"downlevelIteration": true,
"experimentalDecorators": true,
"allowSyntheticDefaultImports": true,
"module": "ES2020",
"moduleResolution": "node",
"importHelpers": true,
"target": "ES2015",
"lib": [
"ES2018",
"DOM"
]
},
"angularCompilerOptions": {
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true,
// "strictTemplates": true // NOTE: https://github.com/angular/angular/issues/25963
}
}
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Updating to Angular 10 error: Failed to parse "tsconfig.json" as ...
Show the content of tsconfig.json, because apparently the migration utility can't parse it. · Sep 14, 2020 at 15:17 ; First message updated...
Read more >Changelog | Meteor API Docs
Throwing an error when the login tokens are not generated well calling requestLoginTokenForUser. PR. Node updated to v14.19.3; npm update to v6.14.17; Fix ......
Read more >TypeScript configuration - Angular
A given Angular workspace contains several TypeScript configuration files. At the root tsconfig.json file specifies the base TypeScript and Angular compiler ...
Read more >TS - Skipping files with no tsconfig.json - Sonar Community
Even though SonarQube finds the tsconfig.json file, ... will only find the two files in the files array because it cannot parse the ......
Read more >parcel-bundler | Yarn - Package Manager
Parcel v1 is no longer maintained. Please migrate to v2, which is published under the 'parcel' package.
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 FreeTop 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
Top GitHub Comments
v2.0.4
should fix it, try again@muuvmuuv #1549 should fix it