Issue I’m running into:
When trying to run daml start
on a dummy project lists other Dars as dependencies, I run into the “Cannot Resolve Template ID” error locally. (I have uploaded the separate dars onto daml hub, and uploaded the ui zip, and there are no issues on daml hub)
I’m working on a project where the current structure looks like this:
parent
main (where I have the daml models)
/Account
/daml/Account.daml
daml.yaml (User, Asset as dependencies)
/Asset
/daml/Asset.daml
daml.yaml
/User
/daml/User.daml
daml.yaml
/LocalDev (this is the dummy project)
/daml/LocalDev.daml
daml.yaml (listing Account, User, Asset dar paths as dependencies)
I first run daml build
for the following:
- Asset
- User
- Account
and finally LocalDev
I then run codegen for Asset, User, Account
daml codegen js main/Asset/.daml/dist/asset-0.0.1.dar main/User/.daml/dist/user-0.0.1.dar main/Account/.daml/dist/account-0.0.1.dar -o ui/daml.js
which produces a daml.js file in my UI directory. And I run npm install.
In one terminal, in the LocalDev directory, I’ll run daml start
, in another terminal in the ui directory, I run npm start
I get error when I try to login:
Within the LocalDev .daml > dependencies
file, I can see 5b1e9…
Within the daml.js file in the UI directory, I don’t see the package ID directly at the first layer where the package IDs are listed, is that the issue?
However, when I go into ‘User-0.0.1’
It seems that the module.js
file references 5b1e9…
Where I’m uncertain about:
Am I creating the dummy project correctly? The LocalDev directory has a daml.yaml file with
sdk-version: 1.18.1
name: LocalDev
source: daml
version: 0.0.1
dependencies:
- daml-prim
- daml-stdlib
- daml-script
- ../Asset/asset.dar
- ../User/user.dar
- ../Account/account.dar
sandbox-options:
- --wall-clock-time
- --ledgerid=wallet-refapp-sandbox
Am I running the codegen correctly with only Asset, User, and Account
daml codegen js main/Asset/.daml/dist/asset-0.0.1.dar main/User/.daml/dist/user-0.0.1.dar main/Account/.daml/dist/account-0.0.1.dar main/LocalDev/.daml/dist/LocalDev-0.0.1.dar -o ui/daml.js
I’ve tried to include LocalDev dar as well, and same error.