How to fix conan new ERROR: Missing definitions for the template. Required definitions are: 'name', 'version'

Problem:

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

conan new cmake_exe

but you see the following error message:

ERROR: Missing definitions for the template. Required definitions are: 'name', 'version'

Solution

Conan wants you to specify the name and version of your package using -d name=myproject -d version=1.0.0.

Full example:

conan new cmake_exe -d name=MyPkg -d version=1.0.0