kamilkisiela / apollo-angular

A fully-featured, production ready caching GraphQL client for Angular and every GraphQL server 🎁
https://apollo-angular.com
MIT License
1.5k stars 311 forks source link

Installing Apollo-client on a version of angular 11.2.6 generates the error ¡Could not read tsconfig.base.json! #1647

Closed jortiz-belike closed 2 years ago

jortiz-belike commented 3 years ago

Describe the bug

I have a version of Angular 11.2.6, after migrating from version 8 in which the project was created. When running the command ng add angular-apollo I get the error that I mention, I have read that version 2.0.4 solves the error, but the one that is trying to install is that same The strangest thing of all is that if I create a project of 0 in version 11.2.6, the command does work, it could not understand what changes in the project in the increase of versions.

My package.json
"dependencies": {
    "@angular-redux/router": "^10.0.0",
    "@angular-redux/store": "^10.0.0",
    "@angular/animations": "~11.2.6",
    "@angular/cdk": "^11.2.6",
    "@angular/common": "~11.2.6",
    "@angular/compiler": "~11.2.6",
    "@angular/core": "~11.2.6",
    "@angular/elements": "^11.2.7",
    "@angular/forms": "~11.2.6",
    "@angular/localize": "^11.2.7",
    "@angular/material": "^11.2.6",
    "@angular/platform-browser": "~11.2.6",
    "@angular/platform-browser-dynamic": "~11.2.6",
    "@angular/pwa": "^0.900.6",
    "@angular/router": "~11.2.6",
    "@angular/service-worker": "^11.2.7",
    "@asymmetrik/ngx-leaflet": "^7.0.1",
    "@asymmetrik/ngx-leaflet-draw": "^6.0.1",
    "@ng-bootstrap/ng-bootstrap": "^5.3.1",
    "@ngx-loading-bar/core": "^5.1.1",
    "@ngx-loading-bar/http-client": "^5.1.1",
    "@ngx-share/core": "^7.1.4",
    "@ngx-translate/i18n-polyfill": "^1.0.0",
    "@swimlane/ngx-datatable": "^19.0.0",
    "@swimlane/ngx-graph": "^7.2.0",
    "@turf/turf": "^5.1.6",
    "@types/googlemaps": "^3.43.2",
    "angular-file-saver": "^1.1.3",
    "angular-highcharts": "^8.0.3",
    "angular-oauth2-oidc": "^10.0.3",
    "apollo-angular": "^2.4.0",
    "bootstrap": "^4.5.3",
    "cheerio": "^1.0.0-rc.5",
    "cronstrue": "^1.108.0",
    "document-register-element": "^1.14.10",
    "fs": "0.0.1-security",
    "highcharts": "^7.2.2",
    "leaflet": "^1.7.1",
    "leaflet-draw": "^1.0.4",
    "leaflet-easybutton": "^2.4.0",
    "leaflet.markercluster": "^1.4.1",
    "linkener-components-design": "^5.2.56",
    "linkener-reports": "0.0.3",
    "mkcert": "^1.4.0",
    "moment-timezone": "^0.5.32",
    "ngx-chips": "^2.2.2",
    "ngx-color-picker": "^10.1.0",
    "ngx-i18nsupport": "^0.17.1",
    "ngx-infinite-scroll": "^9.1.0",
    "ngx-spinner": "^10.0.1",
    "redux": "4.0.1",
    "rxjs": "^6.6.3",
    "tslib": "^2.0.0",
    "x-data-spreadsheet": "^1.1.8",
    "xlsx": "^0.16.9",
    "zone.js": "~0.10.3"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~0.1102.5",
    "@angular/cli": "~11.2.5",
    "@angular/compiler-cli": "~11.2.6",
    "@angular/language-service": "^11.2.7",
    "@types/jasmine": "~3.6.0",
    "@types/jasminewd2": "^2.0.8",
    "@types/leaflet": "^1.5.20",
    "@types/leaflet-draw": "^1.0.3",
    "@types/node": "^13.13.40",
    "babel-polyfill": "^6.23.0",
    "browser-sync": "^2.26.13",
    "codelyzer": "^6.0.0",
    "concat": "^1.0.3",
    "cypress": "5.5.0",
    "fontello-cli": "^0.5.1",
    "fs-extra": "^8.1.0",
    "http-server": "^0.11.1",
    "jasmine-core": "~3.6.0",
    "jasmine-spec-reporter": "~5.0.0",
    "karma": "~6.3.1",
    "karma-chrome-launcher": "~3.1.0",
    "karma-coverage-istanbul-reporter": "~3.0.2",
    "karma-jasmine": "~4.0.0",
    "karma-jasmine-html-reporter": "^1.5.0",
    "mocha": "^5.2.0",
    "mochawesome": "^3.1.2",
    "mochawesome-report-generator": "^3.1.5",
    "ng-packagr": "^11.2.4",
    "protractor": "~7.0.0",
    "redux-devtools-extension": "^2.13.8",
    "shelljs": "^0.8.4",
    "ts-node": "^8.6.2",
    "tsickle": "^0.39.1",
    "tslint": "~6.1.0",
    "typescript": "4.0.7"
  }

To Reproduce Try to install apollo-angular

Expected behavior

I want the library to be able to be installed as in a new angular project (it does not have tsconfig.base and the error does not appear)

Environment:

MarcusRiemer commented 3 years ago

Are you using npm 7 by chance? There seem to be issues with Angular 11.2.6, updating and npm 7 in general: https://github.com/angular/angular-cli/issues/20375

rkristelijn commented 3 years ago

When migrating from angular 10 to 11, angular removes tsconfig.base.json

the following works:

Angular CLI: 11.2.15
Node: 14.17.0
OS: darwin x64

Angular: 11.2.14
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Ivy Workspace: Yes

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1102.15
@angular-devkit/build-angular   0.1102.15
@angular-devkit/core            11.2.15
@angular-devkit/schematics      11.2.15
@angular/cli                    11.2.15
@schematics/angular             11.2.15
@schematics/update              0.1102.15
rxjs                            6.6.7
typescript                      4.1.6