Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache control Type issue #4261

Closed
yaswanthkoneri opened this issue Jun 15, 2020 · 6 comments
Closed

Cache control Type issue #4261

yaswanthkoneri opened this issue Jun 15, 2020 · 6 comments
Labels
🧬 typings Relates to TypeScript changes or improvements.

Comments

@yaswanthkoneri
Copy link

yaswanthkoneri commented Jun 15, 2020

Getting this error

TS2717: Subsequent property declarations must have the same type. Property 'cacheControl' must be of type '{ setCacheHint: (hint: CacheHint) => void; cacheHint: CacheHint; }', but here has type '{ setCacheHint: (hint: CacheHint) => void; cacheHint: CacheHint; }'.

Tried deleting, node_modules and package.lock.json and reinstalling but it's not working

Can someone help on this?

@tejaswi2710
Copy link

Facing the same issue,
ERROR in [at-loader] ./node_modules/apollo-server-express/node_modules/apollo-cache-control/dist/index.d.ts:24:9

Even the apollo-server-express does not have node modules

@Ciboulette
Copy link

Ciboulette commented Sep 24, 2020

Same for me version 2.18.0

@Ciboulette
Copy link

Ciboulette commented Sep 24, 2020

I found a fix if you rm yarn.lock or rm package.lock.json if you are using npm && yarn or npm install

@abernix abernix added the 🧬 typings Relates to TypeScript changes or improvements. label Dec 31, 2020
@Fallenstedt
Copy link

I encountered this too. It looks like the version of apollo-server-plugin-base was too new for the version of apollo-server-core I was using.

You can check your lock file for the dependencies of apollo-server-core. You should see apollo-server-plugin-base and the version in the dependencies. Install that specific version and you should see this error go away.

Screen Shot 2022-02-23 at 12 18 02 PM

@glasser
Copy link
Member

glasser commented Feb 23, 2022

Yeah, there are too many packages that are part of Apollo Server, and the package breaks aren't designed well to avoid circular/diamond dependencies in some cases. Fixing this is a major design goal for Apollo Server 4; if you look at the version-4 branch you will see far fewer separate packages.

@glasser
Copy link
Member

glasser commented Feb 23, 2022

I'm going to close this issue because it's pretty challenging to solve with the current package structure but should be solved with AS4.

There's a workaround for this issue at #3339 (comment) (though that is a bit outdated since the particular package you have to specify is no longer apollo-cache-control).

@glasser glasser closed this as completed Feb 23, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🧬 typings Relates to TypeScript changes or improvements.
Projects
None yet
Development

No branches or pull requests

6 participants