TypeError: damlTypes.assembleTemplate is not a function
- rikotacardsOP
Bit stuck here, anyone have an idea on how to resolve this?
Context:
This is running locally, I build dar files, run codegen, cd ui, npm start, and I see this in the browser.Issue occurs when:
This is after using SDK 2.3.1
SDK 2.3.2 also creates this.SDK 2.2.0 was still working fine, error only occurs after using the recently released SDK.
This app is extended from
create-daml-app. In previous versions of the create-daml-app,
indaml.yaml, we DO NOT have the belowcodegen: js: output-directory: ui/daml.js npm-scope: daml.jsHowever, I just created a new app using
create-daml-app, and I can see in the daml.yamlsdk-version: 2.3.2 name: create-daml-ap-p version: 0.1.0 source: daml dependencies: - daml-prim - daml-stdlib - daml-script start-navigator: false codegen: js: output-directory: ui/daml.js npm-scope: daml.js # Remove this line when running against a ledger without user management. init-script: Setup:setupWould that be the issue?
My current project, the daml directories are separate, there are deps to other daml projects. So for example,
/main /Account /daml daml.yamland the daml.yaml file looks like
sdk-version: 2.3.2 name: Account source: daml version: 0.0.1 dependencies: - daml-prim - daml-stdlib - daml-script - ../Asset/asset.dar - ../User/user.dar sandbox-options: - --wall-clock-timeDo I need to specify a codgen output dir now? (haven’t tried it yet btw) Seeking pointers in case anyone knows off the top of their head.
Update,
I don’t think I need to have the output destination in the daml.yaml, as I have acodegen.shfile
daml codegen js main/Asset/asset.dar main/User/user.dar main/Account/account.dar -o ui/daml.js
that specifies where. - rikotacards 2
My package.json deps were
"@daml/ledger": "2.2.0", "@daml/react": "2.2.0", "@daml/types": "2.2.0",… might be the issue. Let me update that and see.
Updated to
"@daml/ledger": "2.3.2", "@daml/react": "2.3.2", "@daml/types": "2.3.2",Errors are gone again.
- Ben_M 1
Self asked & answered, well done

