How to fix conan ERROR: Template doesn't exist or not a folder

Problem:

You want to initialize a conan project using a command such as

conan_new.sh
conan new myproject/1.0.0

However, once you run it, you see an error message like

conan_error_output.txt
ERROR: Template doesn't exist or not a folder: myproject/1.0.0

Solution

The way you have to use conan new changed with Conan version 2.0.

Now you don’t specify the project name but a template! Templates are names such as cmake_exe but the easiest template to start with is basic as it doesn’t require any parameters:

conan_new_basic.sh
conan new basic

You can also initialize it using a predefined template such as cmake_exe:

conan_new_cmake_exe.sh
conan new cmake_exe -d name=MyProject -d version=1.0.0

 


Check out similar posts by category: Conan