Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to solve error: no such subcommand: `generate`

I have installed rust using curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh on Ubuntu.

But when I tried cargo generate --git https://github.com/CosmWasm/cw-template.git --name FOO I met the error like this error: no such subcommand: 'generate'

My cargo version is cargo 1.59.0 (49d8809dc 2022-02-10).

Why this happens?

like image 678
Bikas Lin Avatar asked Mar 27 '26 11:03

Bikas Lin


1 Answers

You should install the cargo-generate with:

cargo install cargo-generate

Some cargo sub commands are built in, while others are installed separately. You can get the list of available sub commands with:

cargo --list
like image 182
Özgür Murat Sağdıçoğlu Avatar answered Mar 31 '26 11:03

Özgür Murat Sağdıçoğlu



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!