DAML Studio: code is not recognized as an internal or external command

Team,

am new to DAML and am unable to launch daml Studio through command prompt, i have already installed visual studio code and SDK… i got the below error message. kindly help…

‘code’ is not recognized as an internal or external command,
operable program or batch file.

Failed to install DAML Studio extension from marketplace.
Installing bundled DAML Studio extension instead.
‘code’ is not recognized as an internal or external command,
operable program or batch file.

Failed to install DAML Studio extension from current SDK.
Please open an issue on GitHub with the above message.

‘code’ is not recognized as an internal or external command,
operable program or batch file.

Failed to launch DAML studio. Make sure Visual Studio Code is installed.
See Download Visual Studio Code - Mac, Linux, Windows for installation instructions.

Best Regards,
Arunlal

2 Likes

Hi Arunlal,

Have you set the environment variable properly?
This article or the official documentation might help.

Best regards,
Zsolt

1 Like

Would you mind sharing the exact command you ran to generate those error messages? AFAIK you should not need the code CLI command to work in order to use daml studio; having VSCode installed should be enough.

1 Like

On Linux and Windows you need to have code in PATH. On MacOS it should work without that.

Which operating system are you running on?

1 Like

Hi Zsolt,

I have added the Path and logged out and logged in again, but still am facing the same issue and the studio is not opening. Attached the screenshot for reference.


1 Like

Eliminating Daml from the equation for a moment, can you confirm whether if you open up a new terminal and type just “code” that works?

1 Like

I am assuming that @Arunlal_SJ was able to get this remediated?

1 Like

Arunlal,

The error message “Not in project” comes if daml assistant is invoked from outside of a project directory.

I recommend the following steps to be taken for the very first time:

Daml Getting Started
First off, open a terminal, change to a folder in which to create your first application, and instantiate the template project.

  • daml new create-daml-app --template create-daml-app
  • cd create-daml-app

Once the project created, VSC can be launched from the project folder:

  • daml studio
2 Likes