我正在尝试将 apollo-angular 集成到我使用 Angular V8 的 Angular 项目中,但出现以下错误:
我使用的 apollo-angular 版本如下:“@apollo/client”:“^3.4.11”、“apollo-angular”:“^2.6.0”和“graphql”:“^15.5.3” .
另外,想知道是否真的可以将这些 apollo-angular 版本与 Angular V8 一起使用,或者我是否需要升级到 Angular V10?
38 export type { QueryOptions as PureQueryOptions };
~~~~~~
node_modules/@apollo/client/core/types.d.ts:38:13 - error TS1005: ';' expected.
38 export type { QueryOptions as PureQueryOptions };
~
node_modules/@apollo/client/utilities/observables/Observable.d.ts:3:1 - error TS1128: Declaration or statement expected.
3 export type { Observer, ObservableSubscription, Subscriber, };
~~~~~~
node_modules/@apollo/client/utilities/observables/Observable.d.ts:3:13 - error TS1005: ';' expected.
3 export type { Observer, ObservableSubscription, Subscriber, };
~
node_modules/@apollo/client/utilities/observables/Observable.d.ts:3:61 - error TS1109: Expression expected.
3 export type { Observer, ObservableSubscription, Subscriber, };
~
node_modules/ts-invariant/lib/invariant.d.ts:6:87 - error TS1144: '{' or ';' expected.
6 export declare function invariant(condition: any, message?: string | number): asserts condition;
~~~~~~~~~
** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
i 「wdm」: Failed to compile.```
```package.json
{
"dependencies": {
"@angular/animations": "^8.2.14",
"@angular/cdk": "^8.2.3",
"@angular/cli": "^8.3.26",
"@angular/common": "^8.2.14",
"@angular/core": "^8.2.14",
"@angular/forms": "^8.2.14",
"@angular/material": "^8.2.3",
"@angular/platform-browser": "^8.2.14",
"@angular/platform-browser-dynamic": "^8.2.14",
"@angular/router": "^8.2.14",
"@apollo/client": "^3.4.11",
"@babel/compat-data": "7.8.0",
"@ng-bootstrap/ng-bootstrap": "^5.0.0",
"@types/jasmine": "~3.3.8",
"@types/node": "~8.9.4",
"angular-cc-library": "^2.0.1",
"angular-disable-browser-back-button": "^1.0.2",
"apollo-angular": "^2.6.0",
"bn-ng-idle": "^1.0.1",
"bootstrap": "^4.5.0",
"bootstrap4-toggle": "^3.6.1",
"cors": "^2.8.5",
"font-awesome": "^4.7.0",
"graphql": "^15.5.3",
"hammerjs": "^2.0.8",
"jquery": "^3.5.1",
"moment-timezone": "^0.5.31",
"ng-bootstrap": "^1.6.3",
"npm": "^6.14.5",
"popper.js": "^1.16.1",
"rxjs": "~6.4.0",
"timers": "^0.1.1",
"tslib": "^1.13.0",
"zone.js": "~0.9.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.803.24",
"@angular/cli": "^8.3.26",
"@angular/compiler": "^8.2.14",
"@angular/compiler-cli": "^8.2.14",
"@angular/language-service": "^8.2.14",
"@types/jasmine": "~3.3.8",
"@types/jasminewd2": "^2.0.8",
"@types/node": "~8.9.4",
"codelyzer": "^5.2.2",
"install": "^0.13.0",
"jasmine-core": "~3.4.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~4.1.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^1.5.4",
"npm": "^6.14.5",
"protractor": "^5.4.4",
"ts-node": "~7.0.0",
"tslint": "~5.15.0",
"typescript": "~3.5.3"
}
}