0

When compiling version 36 substrate or cumulus I can see this error and not sure how to get rid of

error: cannot find macro `format` in this scope
  --> /Users/hotovo/.cargo/git/checkouts/substrate-56aa5b68bc705a80/8d5b532/primitives/consensus/aura/src/lib.rs:50:3
   |
50 |         app_crypto!(ed25519, AURA);
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: consider importing this macro:
           scale_info::prelude::format
   = note: this error originates in the macro `$crate::app_crypto_public_common_if_std` which comes from the expansion of the macro `app_crypto` (in Nightly builds, run with -Z macro-backtrace for more info)

I tried in substrate repo to comment out those members and the compilation was successful. What could be wrong here? Thank you

#"bin/node-template/node",
#"bin/node-template/pallets/template",
"bin/node-template/runtime",
#"bin/node/bench",
#"bin/node/cli",
#"bin/node/test-runner-example",
#"bin/node/executor",
#"bin/node/primitives",
#"bin/node/rpc",
#"bin/node/rpc-client",
#"bin/node/runtime",
#"bin/node/testing",
#"bin/utils/chain-spec-builder",
#"bin/utils/subkey",

1 Answer 1

1

Check your Cargo.toml.

If you missed any "xxx/std" feature.

Also, you could use subalfred.

https://subalfred.hack.ink/user/cli/check.html#features

3
  • I already using this subalfred feature but still I have this error. Commented Feb 15, 2023 at 11:25
  • Could you share your project?
    – AurevoirXavier
    Commented Feb 15, 2023 at 11:58
  • I forgot to make this answer correct. Thanks Commented Mar 24, 2023 at 12:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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