# Playground Error on most recent version

**URL:** <https://forum.babylonjs.com/t/playground-error-on-most-recent-version/62926>\
**Category:** Questions\
**Created:** [March 25, 2026, 9:39pm UTC](https://forum.babylonjs.com/t/playground-error-on-most-recent-version/62926 "2026-03-25T21:39:53Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pryme8](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/pryme8/32/7212_2.png) [@Pryme8](https://forum.babylonjs.com/u/Pryme8)\
**Post date:** [March 25, 2026, 9:39pm UTC](https://forum.babylonjs.com/t/playground-error-on-most-recent-version/62926/1 "2026-03-25T21:39:53Z")

</div>

![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/b/0/b041f752b5a11c5e9aac8c9fbba0189c2eaa748d.png)

I keep getting this error when I run playgrounds on the newest version. But when I downgrade to 7.\*\* it does not drop.

---

<div class="post-metadata">

**Author:** ![Pryme8](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/pryme8/32/7212_2.png) [@Pryme8](https://forum.babylonjs.com/u/Pryme8)\
**Post date:** [March 25, 2026, 10:04pm UTC](https://forum.babylonjs.com/t/playground-error-on-most-recent-version/62926/2 "2026-03-25T22:04:09Z")

</div>

Also arrow keys are not working on control attach?

---

<div class="post-metadata">

**Author:** ![Joe\_Kerr](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/joe_kerr/32/39017_2.png) [@Joe\_Kerr](https://forum.babylonjs.com/u/Joe_Kerr)\
**Post date:** [March 26, 2026, 7:50am UTC](https://forum.babylonjs.com/t/playground-error-on-most-recent-version/62926/3 "2026-03-26T07:50:08Z")

</div>

The newest version is always just [https://playground.babylonjs.com](https://playground.babylonjs.com), right? If so, I tried Firefox and Chrome. All good 🤔

---

<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 26, 2026, 9:10am UTC](https://forum.babylonjs.com/t/playground-error-on-most-recent-version/62926/4 "2026-03-26T09:10:11Z")

</div>

Would you have a repro we can use to test on our side?

I tested a number of PGs and didn’t get this error.

---

<div class="post-metadata">

**Author:** ![Pryme8](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/pryme8/32/7212_2.png) [@Pryme8](https://forum.babylonjs.com/u/Pryme8)\
**Post date:** [March 26, 2026, 3:57pm UTC](https://forum.babylonjs.com/t/playground-error-on-most-recent-version/62926/5 "2026-03-26T15:57:03Z")

</div>

The funny part is now that 9.0 is on the PG I cant get it to drop anymore as well… o\_O.

Must have just been some oddity with my local client and the last version we had up.

---

<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 26, 2026, 7:59pm UTC](https://forum.babylonjs.com/t/playground-error-on-most-recent-version/62926/6 "2026-03-26T19:59:44Z")

</div>

Actually, I had the error twice when testing PGs before deploying v9!

We’ll try to fix this issue, but since it happens so rarely, it’s a bit more complicated…

[EDIT] This PR should fix it:

> <https://github.com/BabylonJS/Babylon.js/pull/18184>
>
> \## Problem
> 
> The playground intermittently shows:
> 
> \> Error at \[193832, 2\]: /exter…nal/babylon.global.d.ts:193832:2 ',' expected.
> 
> This is caused by the declaration generator (\`generateDeclaration.ts\`) producing \*\*syntactically invalid \`.d.ts\` output\*\* when replacing \`@fluentui\`/\`@fortawesome\`/\`@recast-navigation\` type references with \`any\`.
> 
> The regex has two bugs:
> 
> 1. \*\*Greedy trailing pattern eats colons\*\* — \`\[^,;\\n\>) \]\*\` after the alias consumes \`:\`, turning \`export var ThemeModeSD: SD\<ThemeMode\>\` into \`export var any SD\<any\>\` (colon swallowed, producing a parse error).
> 
> 2. \*\*Matches declaration names\*\* — The regex replaces the alias even when it appears as the \*declared name\* (after \`type\`, \`class\`, \`var\`, etc.), producing invalid syntax like \`export type any = ...\` or \`export class any implements ...\`.
> 
> Currently, \`babylon.inspector-v2.d.ts\` on \`preview.babylonjs.com\` has \*\*5 broken declarations\*\* from this bug (lines 135, 139, 144, 161, 187).
> 
> \## Fix
> 
> Use exact alias matching (the same pattern already used for \`react\` replacements) plus a negative lookbehind to skip declaration sites.
> 
> Both locations in \`generateDeclaration.ts\` (module declarations and namespace declarations) are fixed.
> 
> | Test case | Old regex | Fixed regex |
> |---|---|---|
> | \`export type ThemeMode = ...\` | :x: \`export type any = ...\` | :white\_check\_mark: Kept as-is |
> | \`var ThemeModeSD: SD\<ThemeMode\>\` | :x: \`var any SD\<any\>\` | :white\_check\_mark: \`var ThemeModeSD: SD\<any\>\` |
> | \`export class ThemeResolver ...\` | :x: \`export class any ...\` | :white\_check\_mark: Kept as-is |
> | \`export var ThemeServiceId: ...\` | :x: \`var any unique symbol\` | :white\_check\_mark: Kept as-is |
> | Type references (params, generics, unions) | :white\_check\_mark: Replaced with \`any\` | :white\_check\_mark: Replaced with \`any\` |

---

<div class="post-metadata">

**Author:** ![Pryme8](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/pryme8/32/7212_2.png) [@Pryme8](https://forum.babylonjs.com/u/Pryme8)\
**Post date:** [March 26, 2026, 8:41pm UTC](https://forum.babylonjs.com/t/playground-error-on-most-recent-version/62926/7 "2026-03-26T20:41:33Z")

</div>

Ok cool, so I was not crazy 🤣. Thank you.
