# Error coming from within node\_modules apollo-client

**URL:** <https://community.apollographql.com/t/error-coming-from-within-node-modules-apollo-client/6867>\
**Category:** Client SDKs\
**Tags:** web\
**Created:** [October 20, 2023, 4:35pm UTC](https://community.apollographql.com/t/error-coming-from-within-node-modules-apollo-client/6867 "2023-10-20T16:35:58Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nilo](https://avatars.discourse-cdn.com/v4/letter/n/a8b319/32.png) [@Nilo](https://community.apollographql.com/u/Nilo)\
**Post date:** [October 20, 2023, 4:35pm UTC](https://community.apollographql.com/t/error-coming-from-within-node-modules-apollo-client/6867/1 "2023-10-20T16:35:58Z")

</div>

When trying to build an app, I see an error coming from the node\_modules in regards to apollo-client

Error: node\_modules/@apollo/client/cache/core/types/common.d.ts:52:110 - error TS1005: ‘?’ expected.  
Typescript version : 4.6.4"  
“@apollo/client”: “^3.0.0”

There were no updates made to these versions of late, so not sure what could be causing this.

---

<div class="post-metadata">

**Author:** ![lenz](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/lenz/32/4007_2.png) [@lenz](https://community.apollographql.com/u/lenz)\
**Post date:** [October 23, 2023, 9:07am UTC](https://community.apollographql.com/t/error-coming-from-within-node-modules-apollo-client/6867/2 "2023-10-23T09:07:55Z")

</div>

Could you please check which exact version of Apollo Client you are using? `^3.0.0` describes a very large range of different Apollo Client versions.

---

<div class="post-metadata">

**Author:** ![tinyikosnr](https://avatars.discourse-cdn.com/v4/letter/t/f14d63/32.png) [@tinyikosnr](https://community.apollographql.com/u/tinyikosnr)\
**Post date:** [October 27, 2023, 11:05am UTC](https://community.apollographql.com/t/error-coming-from-within-node-modules-apollo-client/6867/3 "2023-10-27T11:05:40Z")

</div>

I have a similar issue with apollo/client on my angular application. It stopped working without any changes made on modules.

Error: node\_modules/@apollo/client/cache/core/types/common.d.ts:52:110 - error TS1005: ‘?’ expected. My typescript version is “typescript”: “~4.0.2”  
“apollo-angular”: “^2.4.0”,  
“@apollo/client”: “^3.3.18”,

---

<div class="post-metadata">

**Author:** ![tinyikosnr](https://avatars.discourse-cdn.com/v4/letter/t/f14d63/32.png) [@tinyikosnr](https://community.apollographql.com/u/tinyikosnr)\
**Post date:** [October 27, 2023, 11:14am UTC](https://community.apollographql.com/t/error-coming-from-within-node-modules-apollo-client/6867/4 "2023-10-27T11:14:42Z")

</div>

> [@tinyikosnr](#):
>
> what do you mean exact version, i have a similar issue where the error just occurred without any recent changes on packages, on package.json file the versions are listed as “@apollo/client”: “^3.3.18”, “apollo-angular”: “^2.4.0” and “typescript”: “~4.0.2”[quote=“lenz, post:2, topic:6867, full:true”]  
> Could you please check which exact version of Apollo Client you are using? `^3.0.0` describes a very large range of different Apollo Client versions.

---

<div class="post-metadata">

**Author:** ![lenz](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/lenz/32/4007_2.png) [@lenz](https://community.apollographql.com/u/lenz)\
**Post date:** [October 30, 2023, 9:17am UTC](https://community.apollographql.com/t/error-coming-from-within-node-modules-apollo-client/6867/6 "2023-10-30T09:17:27Z")

</div>

@tinyikosnr if you write `^3.3.18` in your package.json, that allows your package manager to randomly choose one of the following versions:

- `3.3.18`
- `3.3.19`
- `3.3.20`
- `3.3.21`
- `3.4.0`
- `3.4.1`
- `3.4.2`
- `3.4.3`
- `3.4.4`
- `3.4.5`
- `3.4.6`
- `3.4.7`
- `3.4.8`
- `3.4.9`
- `3.4.10`
- `3.4.11`
- `3.4.12`
- `3.4.13`
- `3.4.14`
- `3.4.15`
- `3.4.16`
- `3.4.17`
- `3.5.0`
- `3.5.1`
- `3.5.2`
- `3.5.3`
- `3.5.4`
- `3.5.5`
- `3.5.6`
- `3.5.7`
- `3.5.8`
- `3.5.9`
- `3.5.10`
- `3.6.0`
- `3.6.1`
- `3.6.2`
- `3.6.3`
- `3.6.4`
- `3.6.5`
- `3.6.6`
- `3.6.7`
- `3.6.8`
- `3.6.9`
- `3.6.10`
- `3.7.0`
- `3.7.1`
- `3.7.2`
- `3.7.3`
- `3.7.4`
- `3.7.5`
- `3.7.6`
- `3.7.7`
- `3.7.8`
- `3.7.9`
- `3.7.10`
- `3.7.11`
- `3.7.12`
- `3.7.13`
- `3.7.14`
- `3.7.15`
- `3.7.16`
- `3.7.17`
- `3.8.0`
- `3.8.1`
- `3.8.2`
- `3.8.3`
- `3.8.4`
- `3.8.5`
- `3.8.6`

As a result, I can’t tell which version you are actually using in your application.

You can try out this behaviour on [this page](https://semver.npmjs.com/)

That said, I can pinpoint your error now: your version of TypeScript is very outdated and doesn’t support the TypeScript syntax we are using by now anymore. Please upgrade to at least TypeScript version 4.8 or enable the `skipLibCheck` option in your `tsconfig.json` (in some edge case scenarios the AC types will behave weird to you though, if you choose that option).

---

<div class="post-metadata">

**Author:** ![Justin\_Gonzalez](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/justin_gonzalez/32/5359_2.png) [@Justin\_Gonzalez](https://community.apollographql.com/u/Justin_Gonzalez)\
**Post date:** [February 6, 2025, 8:48pm UTC](https://community.apollographql.com/t/error-coming-from-within-node-modules-apollo-client/6867/7 "2025-02-06T20:48:04Z")

</div>


