Closed dmisdm closed 6 years ago
ok, so if bs-platform isn't in the node_modules where I expect it, I should crawl up the directory tree looking for other node_modules? That sounds reasonable.
Ok, I don't think this should be too complicated.
If you want to tackle this, I would suggest doing the search for bs-platform here, and then passing that correct bs-platform directory into the various places that use it, including various places in BuildSystem.re
and in FindFiles.re
.
Awesome thanks. Ill give it a shot, would love to get traction on contributing.
For reference: https://nodejs.org/api/modules.html#modules_all_together
Hi there! Love this project!
Environment
Background
Using reason to share code in workspaces/monorepos is seriously a brilliant experience (using yarn workspaces which hoists dependencies) compared to sharing code with flow or ts. Maybe its just me...
Problem (supposedly)
When running in a project that has hoisted dependencies, for example with yarn workspaces, where dependencies are likely to be located in the node_modules dir in parent directories (and not next to bsconfig.json), i get
Unix.Unix_error(Unix.ENOENT, \"opendir\", \"/Users/dmisdm/dev/test-workspace/project1/node_modules/bs-platform/lib/ocaml\")
. The actual location of bs-platform, reason-react and other deps are in/Users/dmisdm/dev/test-workspace/node_modules/
this is the debug.log
Workarounds
Anyway just thought id mention it. Cheers, thanks for all the work!