0
lenovo@lenovo-IdeaPad-3-15ADA05-Ua:~/substrate-node-template$ cargo check -p node-template-runtime
    error: failed to load manifest for workspace member `/home/lenovo/substrate-node-template/node`

Caused by:
  failed to load manifest for dependency `node-template-runtime`

Caused by:
  failed to parse manifest at `/home/lenovo/substrate-node-template/runtime/Cargo.toml`

Caused by:
  feature `runtime-benchmarks` includes `frame-benchmarking/runtime-benchmarks`, but `frame-benchmarking` is not a dependency

1 Answer 1

1

You have to import frame-benchmarking in your Cargo.toml

frame-benchmarking = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", optional = true , branch = "polkadot-v0.9.40" }

Make sure branch = "polkadot-v0.9.40" has the same version as the rest of the imports.

Look at the substrate-node-template as an example: https://github.com/substrate-developer-hub/substrate-node-template/blob/main/runtime/Cargo.toml#L47

Not the answer you're looking for? Browse other questions tagged or ask your own question.