Upgrading NPM to 5.6.0 breaks TypeScript Compiling

Upgrading my project from BJS 4.2 to 5.6.0 using NPM causes errors when compiling TypeScript. Please advise.
Michael

/./../web/node_modules/babylonjs/babylon.module.d.ts:24516:67 - error TS2304: Cannot find name 'BigUint64Array'.

24516     readValues(firstQuery?: number, queryCount?: number): Promise<BigUint64Array | null>;
                                                                        ~~~~~~~~~~~~~~

../../web/node_modules/babylonjs/babylon.module.d.ts:74451:28 - error TS2304: Cannot find name 'XMLHttpRequestBodyInit'.

74451     send(body?: Document | XMLHttpRequestBodyInit | null): void;
                                 ~~~~~~~~~~~~~~~~~~~~~~

../../web/node_modules/babylonjs/babylon.module.d.ts:123960:71 - error TS2304: Cannot find name 'BigUint64Array'.

123960         readValues(firstQuery?: number, queryCount?: number): Promise<BigUint64Array | null>;
                                                                             ~~~~~~~~~~~~~~

../../web/node_modules/babylonjs/babylon.module.d.ts:170936:32 - error TS2304: Cannot find name 'XMLHttpRequestBodyInit'.

170936         send(body?: Document | XMLHttpRequestBodyInit | null): void;
                                      ~~~~~~~~~~~~~~~~~~~~~~

../../web/node_modules/babylonjs/babylon.module.d.ts:196883:13 - error TS2403: Subsequent variable declarations must have the same type.  Variable 'VRFrameData' must be of type '{ new (): VRFrameData; prototype: VRFrameData; }', but here has type 'any'.

196883 declare var VRFrameData: any;
                   ~~~~~~~~~~~```

What typescript version are you using?

Hi, @RaananW

I’m also facing this issue. and I’m using v4.1.5 of TypeScript and v5.0.0 of BabylonJs.
Getting the same issues as asked.

Is there anything possible without upgrading typescript version.?

You can define those missing types globally, which should work, but I would recommend upgrading typescript because those types were added to the ts libs

1 Like