There are dozens of topics asking for help to make the navigation running and in many cases you need to use ridicolous hacks to get it running. The problems are in the recast/detour js implmentation not in the plugin shipped in the babylon.js libraries.
There is HOPE and now it comes from the dark side Simply follow the 3 steps instructions (README.MD/How to use the plugin in your project).
This implementation uses the recast-navigation-js npm packge instead of recast-js. The babylon.js plugin needed to be rewritten to use the new npm package.
The interface didnāt change just the implementation so you donāt have to change your client code:
class RecastNavigationJSPlugin implements INavigationEnginePlugin
The plugin is fully (should be) compatible with the original plugin shipped in the babylon.js libs. It also should work with all bundlers (vite tested) and in browser environments as well. I didnāt test everything however I already started to use this plugin in my projects and didnāt encounter any issues yet.