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?