Hello everyone,
First of all, a big thank you for your responsiveness! I finally found a solution and was able to pinpoint the exact issue.
Steps to Reproduce:
- Create a new Angular project and update it to Angular 18 with the appropriate dependencies.
- Add any version of Babylon.js 7 to the
dependencies
section of package.json
.
- Open
tsconfig.json
and set "skipLibCheck": false
(by default, it is true
).
Unfortunately, since I’m new to the forum, I can’t upload my project directly. However, here are my package.json
and tsconfig.json
files:
package.json:
{
"name": "babylon-bug-reproduction",
"version": "0.0.0",
"scripts": { ... },
"private": true,
"dependencies": {
"@angular/animations": "^18.2.4",
"@angular/common": "^18.2.4",
"@angular/compiler": "^18.2.4",
"@angular/core": "^18.2.4",
"@angular/forms": "^18.2.4",
"@angular/localize": "^18.2.7",
"@angular/platform-browser": "^18.2.4",
"@angular/platform-browser-dynamic": "^18.2.4",
"@angular/router": "^18.2.4",
"@babylonjs/core": "^7.29.0",
"@babylonjs/inspector": "7.29.0",
"@babylonjs/loaders": "7.29.0",
"@babylonjs/materials": "^7.29.0",
"@babylonjs/serializers": "7.29.0",
...
},
"devDependencies": {
"@angular-devkit/build-angular": "^18.2.4",
"@angular-eslint/builder": "^18.3.1",
"@angular-eslint/eslint-plugin": "^18.3.1",
"@angular-eslint/eslint-plugin-template": "^18.3.1",
"@angular-eslint/schematics": "^18.3.1",
"@angular-eslint/template-parser": "18.3.1",
"@angular/cli": "^18.2.4",
"@angular/compiler-cli": "^18.2.4",
"typescript": "~5.4.5",
...
}
}
tsconfig.json:
{
"compileOnSave": false,
"compilerOptions": {
"outDir": "./dist/out-tsc",
"strict": true,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"skipLibCheck": false,
"isolatedModules": true,
"esModuleInterop": true,
"experimentalDecorators": true,
"moduleResolution": "bundler",
"importHelpers": true,
"target": "ES2022",
"module": "ES2022"
},
"angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false,
"strictInjectionParameters": true,
"strictInputAccessModifiers": true,
"strictTemplates": true
}
}
Errors Encountered:
✘ [ERROR] TS2315: Type 'ArrayBufferView' is not generic. [plugin angular-compiler]
node_modules/@babylonjs/core/Engines/engine.d.ts:473:135:
473 │ ...rayBufferView): Promise<ArrayBufferView<ArrayBufferLike>> | null;
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
✘ [ERROR] TS2315: Type 'Uint8Array' is not generic. [plugin angular-compiler]
node_modules/@babylonjs/core/Meshes/GaussianSplatting/gaussianSplattingMesh.d.ts:306:12:
306 │ sh: Uint8Array<ArrayBuffer>[] | null;
╵ ~~~~~~~~~~~~~~~~~~~~~~~
✘ [ERROR] TS2315: Type 'Float32Array' is not generic. [plugin angular-compiler]
node_modules/@babylonjs/core/Meshes/mesh.d.ts:341:38:
341 │ get worldMatrixInstancedBuffer(): Float32Array<ArrayBufferLike>;
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(And many similar errors)
Solution:
Keep "skipLibCheck": true
in tsconfig.json
.
I hope this helps others facing the same issue! 