I created a library; has a bunch of modules in src
. I publish to my internal Nexus.
In another ReScript project, I npm install it, and add it to the bsconfig.
… however, it can’t seem to find all modules. The compiler gives me that message like:
The module or file ProductTypesV3 can't be found.
- If it's a third-party dependency:
- Did you list it in bsconfig.json?
- Did you run `rescript build` instead of `rescript build -with-deps`
(latter builds third-parties)?
- Did you include the file's directory in bsconfig.json?
The ProductTypesV3
is in the library I published, and other files use it, and I confirmed it’s in node_modules. It appears some of the code is found, and out of paranoia I tried npm run clean
but the only thing that seems to make it happy is instead of just running:
"start": "rescript build -w",
I tried:
"builddeps": "rescript build -with-deps -w",
… and THAT seems to find things. Is this how I should be working with ReScript libraries? How come the @ryyppy/rescript-promise
library works fine and mine doesn’t?