I have been hitting this error after upgrading to the latest version of TypeScript which includes new features like optional chaining, although the circle server is failing to run the tests.
Locally on the machines here it works fine which is strange, even after rimrafing my local node_modules folder and reinstalled everything and they still pass locally.
I have set a new name for “CACHE_VERSION” to ensure it is including the changes I made in my yarn.lock file. I also ssh’d into the machine and ran the tests but they also do not run there.
Kinda stumped on where to go from here but also curious as to why it runs locally and not on circleci.