Skip to content
Discussions/App Development/Error running the UI on the test appForum ↗

Error running the UI on the test app

App Development6 posts728 views7 likesLast activity Feb 2023
JA
jacal18OP
Nov 2022

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

BE
Ben_M
Nov 2022

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.

GA
Gary_Verhaegen
Nov 2022

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.
JV
jvelasco.intellecteu
Dec 2022

Hi, I’ve followed those steps, however it fails when I try to run npm install.

EDIT - The problem in my machine seems to be related to npm version. I’ve downgraded from 9.2.0 to 8.6.0 and now it is working. (BTW, I’m using node v18.12.1)

LO
lordwilliam
Jan 2023

Thank very much @jvelasco.intellecteu your answer solved my problem.
I downgraded to npm version 8.19.3 by running “npm install -g npm@8.19.3” without the quotation marks in the terminal.

JA
jacal18
Feb 2023

Thank you so much for this explanation, it worked for me!

← Back to Discussions