# Error + solution in compiling the template project specified on the babylonjs website

**URL:** <https://forum.babylonjs.com/t/error-solution-in-compiling-the-template-project-specified-on-the-babylonjs-website/38691>\
**Category:** Bugs\
**Created:** [March 2, 2023, 9:45pm UTC](https://forum.babylonjs.com/t/error-solution-in-compiling-the-template-project-specified-on-the-babylonjs-website/38691 "2023-03-02T21:45:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rascheln](https://avatars.discourse-cdn.com/v4/letter/r/e19b73/32.png) [@rascheln](https://forum.babylonjs.com/u/rascheln)\
**Post date:** [March 2, 2023, 9:45pm UTC](https://forum.babylonjs.com/t/error-solution-in-compiling-the-template-project-specified-on-the-babylonjs-website/38691/1 "2023-03-02T21:45:11Z")

</div>

I am following the instructions specified here [Babylon.js ES6 support with Tree Shaking | Babylon.js Documentation](https://doc.babylonjs.com/setup/frameworkPackages/es6Support)

After numerous failed attempts to get a babylon project working from an empty directory, I decided to relent and use their template project, linked from [GitHub - RaananW/babylonjs-webpack-es6: Babylon.js basic scene with typescript, webpack, es6 modules, editorconfig, eslint, hot loading and more. Will even make coffee if you ask nicely.](https://github.com/RaananW/babylonjs-webpack-es6)

I followed the instructions to the best of my knowledge.  
1: clone the repo locally  
2: npm install  
3: npm start

The error I am getting is:

```auto
TS2339: Property 'renderCount' does not exist on type '{ name: string; url: string; waitForNetworkIdle?: undefined; } | { name: string; url: string; waitForNetworkIdle: boolean; }'.
  Property 'renderCount' does not exist on type '{ name: string; url: string; waitForNetworkIdle?: undefined; }'.

```

This occurs in the file `validation.spec.ts`. When I look in that file, there’s:

```auto
const scenes = [
  {
    name: 'Default',
    url: '/?scene=defaultWithTexture',
  },
  {
    name: 'Fresnel Shader',
    url: '/?scene=fresnelShader',
  },
  {
    name: 'Load model and env',
    url: '/?scene=loadModelAndEnv',
  },
  {
    name: 'Navigation mesh recast',
    url: '/?scene=navigationMeshRecast',
    waitForNetworkIdle: true,
  },
  // {
  // name: 'Physics (ammo)',
  // url: '/?scene=physicsWithAmmo',
  // renderCount: 5,
  // },
]

```

then, later on, there’s a conditional `if (scene.renderCount)...`  
so the initial array has no typing to it, when it should be something like

```auto
const scenes: { name: string, url: string, waitForNetworkIdle?: boolean, renderCount?: number }[] = { ... };

```

if I put that line in the code, changing nothing else, then the scene loads successfully. Alternatively, you can just not type the array at all and uncomment that last entry.

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [March 3, 2023, 11:41am UTC](https://forum.babylonjs.com/t/error-solution-in-compiling-the-template-project-specified-on-the-babylonjs-website/38691/2 "2023-03-03T11:41:54Z")

</div>

cc @RaananW.

You can add `renderCount: 0` in each object of the scene to make it work (or do `(scene as any).renderCount` instead of `scene.renderCount` in the test condition). I guess it’s the current version of Typescript which is less forgiving than when Raanan created the project.

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [March 3, 2023, 12:35pm UTC](https://forum.babylonjs.com/t/error-solution-in-compiling-the-template-project-specified-on-the-babylonjs-website/38691/3 "2023-03-03T12:35:10Z")

</div>

ha! this file should not be a part of the compilation process. I know what happened, will take care of that.

Thanks 🙂

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [March 3, 2023, 12:37pm UTC](https://forum.babylonjs.com/t/error-solution-in-compiling-the-template-project-specified-on-the-babylonjs-website/38691/4 "2023-03-03T12:37:57Z")

</div>

a quick fix was pushed, I will solve it more long-term very soon.
