How Do You Troubleshoot the Cargo Problem “error: no such subcommand: add”?

Problem scenario
You run a Cargo command, but you get this:

error: no such command `add`
Did you mean `b
`?

What should you do?

Solution
Run this: sudo cargo install cargo-edit

It can take 15 minutes to run. This should eliminate the problem.

Leave a comment

Your email address will not be published. Required fields are marked *