Problem with defining the module name
- AliceOP 1
Hi everybody! I’m having some troubles in defining the module name on VS Code. I’ve created a file named “CreditCard.daml” and as module I’ve written “module CreditCard where”. At first VS Code was displaying an error but after a while it was not displaying it anymore. So, I went to the terminal to build a dar file with the command “daml build”, but it says that it’s not possible because the module name is missing.
I really don’t know what I’m doing wrong and I hope that one of you can help me with that. Thanks in advance.
- Leonid_Rozenberg
Hello @Alice. This is a bit of a long shot but are you sure that the file is saved? There have been times where due to vscode’s caching mechanism it shows the file without any changes, such as when you copy and paste, but it has not actually been written to your hard drive. If you
catthe file in your terminal does it havemodule CreditCard whereat the top? - cocreature
To double check @Leonid_Rozenberg’s theory, can you show us the output of
cat daml/CreditCard.damlrun from the same terminal where you randaml build? - Alice
- cocreature
You have a typo, it should be
ContractIdnotcontractId. - Alice 2
Thank you so much for your help! I really didn’t see that mistake.
- quidagis 2
Alice:I would try the cat thing, but I don’t know how to do it.
Ah cats!

What @cocreature meant was to open a Terminal in your Desktop (Which I am assuming is a MAC), change to the main directory of your newly created Daml app, and execute the
cat(Which is short for Concatenate) command and view the contents, if any, of thedaml/CreditCard.damlfile.To do that, do this:
# Change to your Home_Directory $ cd # Change to your new Daml app $ cd /path/to/your_new_daml_app # Example: if your Daml app is in your Projects folder $ cd Project/your_new_daml_app $ cat daml/CreditCard.damlTo learn more about the Command Line on MAC, try => this
There are a lot of MAC users in this forum (Not me
), please ask. - Alice 3
thank you so much!

