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

get error when run npm run build command #7543

Closed
webafra opened this issue Jul 12, 2021 · 4 comments
Closed

get error when run npm run build command #7543

webafra opened this issue Jul 12, 2021 · 4 comments
Labels
needs triage This issue has not been looked into

Comments

@webafra
Copy link

webafra commented Jul 12, 2021

Hello.
When I update the project, the project will no longer run and will give an error

I ran the following command and the error started:
npm update

Errors:

> nest build

node_modules/apollo-cache-control/dist/index.d.ts:32:9 - error TS2687: All declarations of 'overallCachePolicy' must have identical modifiers.

32         overallCachePolicy?: Required | undefined;
           ~~~~~~~~~~~~~~~~~~
node_modules/apollo-cache-control/dist/index.d.ts:32:9 - error TS2717: Subsequent property declarations must have the same type.  Property 'overallCachePolicy' must be of type 'CachePolicy', but here has type 'Required'.

32         overallCachePolicy?: Required | undefined;
           ~~~~~~~~~~~~~~~~~~

  node_modules/apollo-server-types/dist/index.d.ts:82:14
    82     readonly overallCachePolicy: CachePolicy;
                    ~~~~~~~~~~~~~~~~~~
    'overallCachePolicy' was also declared here.
node_modules/apollo-server-types/dist/index.d.ts:82:14 - error TS2687: All declarations of 'overallCachePolicy' must have identical modifiers.

82     readonly overallCachePolicy: CachePolicy;

image

Environment

Mac Os Big sur
Node: v14.16.1
Nest version: 7.6.15

@webafra webafra added the needs triage This issue has not been looked into label Jul 12, 2021
@jmcdo29
Copy link
Member

jmcdo29 commented Jul 12, 2021

Possibly related to this? nestjs/graphql#1621

@greatSumini
Copy link

greatSumini commented Jul 13, 2021

it seems apollo-cache-control conflits with [email protected]. I resolved this issue by manually installing [email protected]!

(apollo-cache-control is deprecated for apollo-server-core@^3.0.0. I hope nestjs/graphql#1625 resolves this issue)

@webafra
Copy link
Author

webafra commented Jul 13, 2021

after install @apollo/gateway, get new error:
npm i ts-morph @apollo/gateway

> nest build

node_modules/apollo-cache-control/dist/index.d.ts:32:9 - error TS2687: All declarations of 'overallCachePolicy' must have identical modifiers.

32         overallCachePolicy?: Required<CacheHint> | undefined;
           ~~~~~~~~~~~~~~~~~~
node_modules/apollo-cache-control/dist/index.d.ts:32:9 - error TS2717: Subsequent property declarations must have the same type.  Property 'overallCachePolicy' must be of type 'CachePolicy', but here has type 'Required<CacheHint>'.

32         overallCachePolicy?: Required<CacheHint> | undefined;
           ~~~~~~~~~~~~~~~~~~

  node_modules/apollo-server-types/dist/index.d.ts:82:14
    82     readonly overallCachePolicy: CachePolicy;
                    ~~~~~~~~~~~~~~~~~~
    'overallCachePolicy' was also declared here.
node_modules/apollo-server-types/dist/index.d.ts:82:14 - error TS2687: All declarations of 'overallCachePolicy' must have identical modifiers.

82     readonly overallCachePolicy: CachePolicy;
                ~~~~~~~~~~~~~~~~~~

@kamilmysliwiec
Copy link
Member

@nestjs/graphqlv8 is compatible with Apollo v2. You shouldn't use it with Apollo v3 atm.

@nestjs nestjs locked and limited conversation to collaborators Jul 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs triage This issue has not been looked into
Projects
None yet
Development

No branches or pull requests

4 participants