Quantcast
Channel: ReScript Forum - Latest posts
Viewing all articles
Browse latest Browse all 1770

Package import "Diamond Problem" and building dependencies

$
0
0

Hi All
So I now have a package that is our core lib. I am using this package as both a first-order and second-order dependency in our application (We have it in dependencies, and we have a dependency that has it as a dependency). When I build I see a log:

Duplicated package: @nobleai/rescript-prelude /code/noble-sl/web/node_modules/@nobleai/rescript-prelude (chosen) vs /code/noble-sl/web/node_modules/@nobleai/rescript-fields/node_modules/@nobleai/rescript-prelude in /code/noble-sl/web/node_modules/@nobleai/rescript-fields 

which seems to suggest it takes the immediate dependency and doesnt build the second-order dependency? If i look in node_modules directory rescript-fields I dont see the dependencies built.

Then I run some code in my tests that exercises rescript-fields that crashes:

 FAIL  src/components/Objective.test.bs.js [ src/components/Objective.test.bs.js ]
Error: Failed to resolve import "@nobleai/rescript-prelude/src/Map.bs.js" from "node_modules/@nobleai/rescript-fields/src/UseField.bs.js". Does the file exist?

So, is there something to be done to alias those imports when one build of a project is picked and the other is skipped?

TIA
A


Viewing all articles
Browse latest Browse all 1770

Trending Articles