How to use RecastJSPlugin in version 5.13

the recast-detour version is 1.5.0

import * as Recast from 'recast-detour'
import { RecastJSPlugin } from '@babylonjs/core'

let recast = await Recast();
const navigationPlugin = new RecastJSPlugin(recast);

Then send an error:
Uncaught (in promise) TypeError: Cannot set properties of undefined (setting ‘Recast’)

how to use RecastJSPlugin?

try to import Recast from ‘recast-detour’ instead import * as Recast from ‘recast-detour’

Hello @zz_dz just checking in if you’re still having issues.

I met the same problem, when importing ‘recast-detour’ package,

import * as BABYLON from '@babylonjs/core'
import Recast from 'recast-detour

const recast = await Recast
const navigationPlugin = new BABYLON.RecastJSPlugin(recast)

the error is blow:

SyntaxError: The requested module '....XXX' does not provide an export named 'fileURLToPath'

It seems about the ES6 module input error. Accourding to this post, I change the first line of d.ts file. But not work it out.
Can someone show demo using recast-detour via NPM?

cc @RaananW and @Cedric