Babylonjs unity-exporter package - Build project error

Unity version - 2021.2.6f1
Babylon package - Babylon Editor Toolkit_5.0.0_A61.unitypackage

After import , I have simply saved my blank scene. When i click on play button, it says Build Project > Build , then it says Build Failed with error in console

Assets/[Babylon]/Template/Typings/babylon.d.ts(44738,32): error TS2304: Cannot find name ‘XMLHttpRequestBodyInit’.
Assets/[Babylon]/Template/Typings/babylon.d.ts(92158,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’.

System.UnityTools:CompileProjectScriptBundle (System.IO.StreamWriter,string,string,string,string,bool,string)
CanvasTools.CanvasToolsExporter:ExportProject (string,EditorSceneInformation,EditorBuildType,UnityEngine.Transform,string,string)
CanvasTools.CanvasToolsExporter:BuildProject (EditorBuildType,UnityEngine

and when I launch web preview, nothing loads…screenshots attached for reference

Please guide and help me getting started

Tagging @MackeyK24

1 Like

You need to install or update your type script version

You can also install a local project typescript… check script compilations section on exporter panel

Basically run npm install in the project root folder to install local typescript

I have already done that in the beginning. It is running from local

if your talking about the XMLHttpRequestBodyInit error in babylon.d.ts…

Then its your typescript compiler… you need at least 4.4.2…

try running this again

npm install -g typescript

this issue is sovedwith local typescript installation, please close this

1 Like