Search code examples
daml

How can I fix this yarn when using daml 1.0.1?


In the process of building the create-daml-app project using daml SDK 1.0.1, I'm running into a yarn error when I do daml codegen js .daml/dist/create-daml-app-0.1.0.dar -o daml.js. It returns

Failure: "yarn install --pure-lockfile" exited with ExitFailure 2
Usage: yarn [options]

yarn: error: no such option: --pure-lockfile

I'm not very familiar with yarn so I'm not sure how to proceed. Can someone point me in the right direction? Thanks!

yarn version: 0.32+git

This error occurs for daml SDK 1.0.0 as well.


Solution

  • This sounds like you probably have cmdtest installed which provides a command called yarn as well but has nothing to do with the yarn package manager. Take a look at the prerequisites at https://docs.daml.com/getting-started/index.html#prerequisites for instructions on how to remove cmdtest and a link to the installation instructions for the yarn package manager.