i am getting issue in apollo-cache-inmemory package
See original GitHub issuei am getting issue while using apollo client
here is my code :
export class AppModule { constructor(apollo: Apollo,httpLink: HttpLink) { apollo.create({ link: httpLink.create({ uri:'http://localhost:8000/graphql'}), cache: new InMemoryCache() }) } }
package.json:
{ “name”: “p”, “version”: “0.0.0”, “scripts”: { “ng”: “ng”, “start”: “ng serve”, “build”: “ng build”, “test”: “ng test”, “lint”: “ng lint”, “e2e”: “ng e2e” }, “private”: true, “dependencies”: { “@angular-devkit/core”: “^7.3.0”, “@angular-devkit/schematics”: “^7.3.0”, “@angular/animations”: “^6.1.10”, “@angular/cdk”: “^7.3.2”, “@angular/common”: “^6.0.3”, “@angular/compiler”: “^6.0.3”, “@angular/core”: “^6.0.3”, “@angular/forms”: “^6.0.3”, “@angular/http”: “^6.0.3”, “@angular/material”: “^7.3.2”, “@angular/platform-browser”: “^6.0.3”, “@angular/platform-browser-dynamic”: “^6.0.3”, “@angular/router”: “^6.0.3”, “@ngrx/effects”: “^7.2.0”, “@ngrx/router-store”: “^7.2.0”, “@ngrx/store”: “^7.2.0”, “@ngrx/store-devtools”: “^7.2.0”, “apollo-angular”: “^1.5.0”, “apollo-angular-link-http”: “^1.5.0”, “apollo-cache-inmemory”: “^1.4.3”, “apollo-client”: “^2.4.13”, “bootstrap”: “^4.2.1”, “core-js”: “^2.5.4”, “font-awesome”: “^4.7.0”, “graphql”: “^14.1.1”, “graphql-tag”: “^2.10.1”, “ng2-toastr”: “^4.1.2”, “rxjs”: “^6.0.0”, “rxjs-compat”: “^6.3.3”, “zone.js”: “^0.8.26” }, “devDependencies”: { “@angular-devkit/build-angular”: “~0.6.8”, “@angular/cli”: “~6.0.8”, “@angular/compiler-cli”: “^6.0.3”, “@angular/language-service”: “^6.0.3”, “@ngrx/schematics”: “^7.2.0”, “@types/jasmine”: “~2.8.6”, “@types/jasminewd2”: “~2.0.3”, “@types/node”: “~8.9.4”, “codelyzer”: “~4.2.1”, “jasmine-core”: “~2.99.1”, “jasmine-spec-reporter”: “~4.2.1”, “karma”: “~1.7.1”, “karma-chrome-launcher”: “~2.2.0”, “karma-coverage-istanbul-reporter”: “~2.0.0”, “karma-jasmine”: “~1.1.1”, “karma-jasmine-html-reporter”: “^0.2.2”, “protractor”: “~5.3.0”, “ts-node”: “~5.0.1”, “tslint”: “~5.9.1”, “typescript”: “~2.7.2” } }
and error i am getting is: ERROR in node_modules/apollo-cache-inmemory/lib/inMemoryCache.d.ts(16,32): error TS1144: ‘{’ or ‘;’ expected. node_modules/apollo-cache-inmemory/lib/inMemoryCache.d.ts(17,1): error TS1128: Declaration or statement expected.
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (3 by maintainers)
@subhashish12 Another person with a similar problem was able to update
typescript
by updating Angular CLI as well, which solved the problem: https://github.com/apollographql/apollo-client/issues/4501#issuecomment-468001034If that’s not an option for you, there might be a way to disable type checking for the
apollo-utilities
package specifically, though I don’t know enough about Angular’s TypeScript setup to know the best way to do that.It sounds like this issue was resolved (let us know if not). Thanks!