Skip to content
CCPEDIAby Unity Nodes
Discussions/App Development/I get "Trying to look up template ..." error in front endForum ↗

I get "Trying to look up template ..." error in front end

App Development2 posts482 views3 likesLast activity Nov 2020
XU
XuyxOP
Nov 2020

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 .

CO
cocreature
Nov 2020

Hi @Xuyx, the issue is that your SDK version is 1.7.0 while the version of the @daml/ledger, @daml/types and @daml/react specified in your package.json is 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:

  1. Update the version numbers in UI/package.json for all 3 libraries to 1.7.0.
  2. Delete UI/daml.js, UI/node_modules and UI/package-lock.json.
  3. Rerun daml start which will generate the JS code before starting the ledger.
  4. Run npm install in the UI directory.
  5. Run npm start to startup the frontend.
← Back to Discussions