Error running the UI on the test app
- jacal18OP 2
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
- Ben_M
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 startSecond_Terminal:
$ cd create-daml-app/ui $ npm install $ npm startThe particular error,
ENOENTmeans thatnpmhas failed to open a file or directory that’s required for executing the command, so either you are not in the correct directory which iscreate-daml-dar/uior you are in the correct directory but thepackage.jsonfile is missing.Follow those steps above, if it works great. If not, then just
rm -rf create-daml-appand go again.Let me know if this helps.
- Gary_Verhaegen
The most likely issue for that error message is that you did not run
daml start(or it somehow failed).daml startis a shortcut to run a number of separate commands as one; in this case, the two crucial steps are:-
daml buildto compile the Daml code into a DAR file. -
daml codegen jsto parse the DAR file and generate JS code based on it. I suspect this is the missing code in your case.
-
- jvelasco.intellecteu 3
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)
- lordwilliam 1
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. - jacal18 1
Thank you so much for this explanation, it worked for me!