Error running the UI on the test app

Just trying to get the create-daml-app UI running.

After installing SDK and running daml start I try to import the nom elements required by running rpm install but it tells me there is a missing file.

create-daml-app/ui/node_modules/@daml.js/40f452260bef3f29dede136108fc08a88d5a5250310281067087da6f0baddff7/package.json

npm ERR! enoent ENOENT: no such file or directory, open

1 Like

Welcome @jacal18 to the Forum.

I’ll assume that you are using a MacOS or Linux as your system.

For this create-daml-app, you will need two terminals:

First_Terminal:

$ daml new --template create-daml-app create-daml-app
$ cd create-daml-app/
$ daml start

Second_Terminal:

$ cd create-daml-app/ui
$ npm install
$ npm start

The particular error, ENOENT means that npm has failed to open a file or directory that’s required for executing the command, so either you are not in the correct directory which is create-daml-dar/ui or you are in the correct directory but the package.json file is missing.

Follow those steps above, if it works great. If not, then just rm -rf create-daml-app and go again.

Let me know if this helps.

The most likely issue for that error message is that you did not run daml start (or it somehow failed). daml start is a shortcut to run a number of separate commands as one; in this case, the two crucial steps are:

  • daml build to compile the Daml code into a DAR file.
  • daml codegen js to parse the DAR file and generate JS code based on it. I suspect this is the missing code in your case.