question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

i am getting issue in apollo-cache-inmemory package

See original GitHub issue

i 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:closed
  • Created 5 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
benjamncommented, Feb 28, 2019

@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-468001034

If 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.

0reactions
hwillsoncommented, Apr 27, 2021

It sounds like this issue was resolved (let us know if not). Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configuring the Apollo Client cache - Apollo GraphQL Docs
Create an InMemoryCache object and provide it to the ApolloClient constructor, ... The InMemoryCache constructor accepts a variety of configuration options.
Read more >
apollo-cache-inmemory - npm Package Health Analysis - Snyk
The npm package apollo-cache-inmemory was scanned for known vulnerabilities and missing license, and no issues were found. Thus the package was deemed as...
Read more >
@apollo/client | Yarn - Package Manager
Apollo Client is a fully-featured caching GraphQL client with integrations for React, Angular, and more. It allows you to easily build UI components...
Read more >
apollo-cache-inmemory - Awesome JS
IMPORTANT Version 3.7.3 is not installable due to an issue with our release process which caused a mismatch between package-lock.json and package.json ...
Read more >
Unanswered 'apollo-cache-inmemory' Questions - Stack Overflow
I have a problem with ApolloClient Caching. There are a few items that are not stored in the cache. Env: React Native Packages:...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found