I get "Trying to look up template ..." error in front end
- XuyxOP
The request is fine, but it throws error in front end.
I have uploaded my project here https://github.com/xyxhwq/DAML.git, in the folder of Problem2.I deleted the package-lock.json and node_modules, and run daml build, daml codegen js, npm i to install the dependencies again.I tried twice, however, it still didn’t work.
The request in front end locates Problem2\UI\src\components\IssuerView.tsx:32.
Steps:Types “Bank” and login as issuer, then types a number and click “Issue”.What’s more. The ownerId has typescript error at line 35 and I don’t know how to fix it in the same file .
- cocreature 3
Hi @Xuyx, the issue is that your SDK version is
1.7.0while the version of the@daml/ledger,@daml/typesand@daml/reactspecified in yourpackage.jsonis still 1.6.0. The two always need to be kept in sync. The following steps worked for me to fix the issue in your project:- Update the version numbers in
UI/package.jsonfor all 3 libraries to1.7.0. - Delete
UI/daml.js,UI/node_modulesandUI/package-lock.json. - Rerun
daml startwhich will generate the JS code before starting the ledger. - Run
npm installin theUIdirectory. - Run
npm startto startup the frontend.
- Update the version numbers in