Yarn rebuild error

Hi Everyone .
I am trying Suitecrm 8.8 on localhost with
Angular CLI: 18.2.9
Node: 20.19.2
Package Manager: yarn 4.5.0
PHP 8.2.12
during yarn build I get
node_modules/apollo-angular/query-ref.d.ts:21:58 - error TS2314: Generic type ‘UpdateQueryOptions’ requires 2 type argument(s).

21 updateQuery(mapFn: (previousQueryResult: T, options: UpdateQueryOptions) => T): void;
what could possibly go wrong and how to remove this error I have tried several ways but got other errors.please guide

when tried remove this one error got 2 others
node_modules/apollo-angular/types.d.ts:2:158 - error TS2305: Module ‘“@apollo/client/core”’ has no exported member ‘WatchFragmentOptions’.

2 import type { ApolloClientOptions, MutationOptions as CoreMutationOptions, QueryOptions as CoreQueryOptions, SubscriptionOptions as CoreSubscriptionOptions, WatchFragmentOptions as CoreWatchFragmentOptions, WatchQueryOptions as CoreWatchQueryOptions, FetchResult, OperationVariables, TypedDocumentNode } from ‘@apollo/client/core’;
~~~~~~~~~~~~~~~~~~~~
node_modules/apollo-angular/apollo.d.ts:3:123 - error TS2305: Module ‘“@apollo/client/core”’ has no exported member ‘WatchFragmentResult’.

3 import type { ApolloClientOptions, ApolloQueryResult, FetchResult, OperationVariables, QueryOptions, SubscriptionOptions, WatchFragmentResult } from ‘@apollo/client/core’;
Really need help … Am I missing something important ?

Hi @SaqibR
It looks like a version mismatch between apollo-angular and @apollo/client.
Try this to solve : yarn add @apollo/client@3.7.14 graphql@16.6.0 typescript@4.9.5 -D
That should fix most of the issues. If it still doesn’t work, feel free to share here.

1 Like

thank you @Urvi . With the help of AI, I downgraded these versions had other errors removed those as well and succesfully executed build command but still dont know what actually happened . I followed official compatibility matrix still got these compatibility issues.

I wish someone get me a solid document/video regarding this front end extension as official docuemnts are not good enough to provide solutions .

@SaqibR Feel free to drop your contact info — if I have any video related to this, I’ll be happy to share it with you directly. :blush:

1 Like