Amplitude-TypeScript icon indicating copy to clipboard operation
Amplitude-TypeScript copied to clipboard

TS1005 Error amplitude/analytics-types/element-interaction.ts:70:39 ? expected During Angular build amplitude/analytics-browser version 2.9.3

Open RakeshrajA5 opened this issue 1 year ago • 2 comments

TS1005 Error amplitude/analytics-types/element-interaction.ts:70:39 ? expected During Angular build amplitude/analytics-browser version 2.9.3

RakeshrajA5 avatar Sep 19 '24 07:09 RakeshrajA5

@RakeshrajA5 can you please try with the latest version to see if it solves the problem?

izaaz avatar Sep 19 '24 20:09 izaaz

Hi @RakeshrajA5, is it the same issue as https://github.com/amplitude/Amplitude-TypeScript/issues/882? Could you run yarn list @amplitude/analytics-types in your project and share the screenshot? Thanks

Mercy811 avatar Sep 19 '24 20:09 Mercy811

Getting the same error.

Error: node_modules/@amplitude/analytics-types/lib/esm/element-interactions.d.ts:70:64 - error TS1005: '?' expected.
Element: infer T extends abstract new (...args: any) => any;

running npm install @amplitude/analytics-types results in a successful build locally, but the error still occurs when starting the development server, or on the Netlify build.

Abde-T avatar Sep 30 '24 14:09 Abde-T

@izaaz @Mercy811 We have the same issue while building our Angular app

AyoubTRD avatar Oct 01 '24 14:10 AyoubTRD

Same error running on Next.js:

migueljimenez@MJ0292~codecobeedashboard-2 0 2024-10-02 at 12 11 42 PM

milingo avatar Oct 03 '24 08:10 milingo

analytics-browser 2.11.8 and analytics-types 2.8.3 should fix it

Mercy811 avatar Oct 21 '24 22:10 Mercy811