Missing dependency in search path when using dynamic import

Has anyone encountered this before? As soon as I use Js.import() I get this error. Rescript v11. No idea where to begin debugging this. Thanks :pray:

What’s the error message?

Oh sorry, it’s

Missing dependency X in search path

where X is Js.import(X.make) (following the lazy component docs)

Is this error in the actual build, or just in the editor?

It’s in the build, i.e. the terminal command rescript.

Could you create a minimal reproduction repo?

Yes, here you go: GitHub - benadamstyles/rescript-js-import-repro

Reproduces reliably. Thanks!

Could you open an issue on the compiler repo as well, and link it from there? Then we can keep the discussion there.

Yep, done.

1 Like