I am working on updating our demo and using
daml codegen js for the first time. I’m definitely glad @cocreature put me on to it, it’s a really nifty tool.
However, I’m having a bit of trouble with it.
ex-bond-issuance as a baseline, I updated the DAML model to include our proprietary product - let’s call it
OptimisProduct (including scenarios, scripts, triggers, etc.).
Once I did this, I rebuilt the
bond-issuance.dar file and then ran
daml codegen js. In the
@daml.js folder I can see the
@daml.js/bond-issuance-2.0.0/lib/DA/RefApps/Bond/OptimisProduct is generated. I cross-checked the code against the equivalent for
FixedRateBond base case example and the codegen appears to have worked.
However, when I run
yarn start I get the following error:
``` ./src/pages/issuerRole/IssuerRole.jsModule not found: Can't resolve '@daml.js/bond-issuance-2.0.0/lib/DA/RefApps/Bond/OptimisProduct' in '...\ex-bond-issuance-master\ui-js\src\pages\issuerRole' ```
I usually see similar errors when I misspelled something, or deleted a file because I’m not using it anymore. I can see that the folder exists by clicking through the above path, but when I try to type out in visual studio my linter doesn’t pick it up as existing.
The only error I am getting in Visual Studio is the below:
Has anyone experienced an error like this when using
daml codegen js? Could it be related to the error in the