JoshOrndorff / recipes

A Hands-On Cookbook for Aspiring Blockchain Chefs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

error: could not compile `api-runtime` due to 5 previous errors

hqwangningbo opened this issue · comments

Recently, I was studying substrat.
I am getting the following error on M1 chip.
The following warnings were emitted during compilation:

error[E0107]: this enum takes 1 generic argument but 0 generic arguments were supplied
--> /Users/wangningbo/StudySubstrate/recipes/runtimes/api-runtime/src/lib.rs:214:1
|
214 | / construct_runtime!(
215 | | pub enum Runtime where
216 | | Block = Block,
217 | | NodeBlock = opaque::Block,
... |
227 | | }
228 | | );
| |__^ expected 1 generic argument
|
note: enum defined here, with 1 generic parameter: T
--> /Users/wangningbo/StudySubstrate/recipes/pallets/sum-storage/src/lib.rs:27:11
|
27 | pub enum Event<T: Config> {
| ^^^^^ -
= note: this error originates in the macro $crate::impl_outer_event (in Nightly builds, run with -Z macro-backtrace for more info)
help: add missing generic argument
|
477 | $module_name::Event &lt;T $( $generic_param, )? $( $module_name::$generic_instance )? >, Self::Error
| +

For more information about this error, try rustc --explain E0107.
error: could not compile api-runtime due to 5 previous errors
warning: build failed, waiting for other jobs to finish...
error: build failed

What is the reason 😭?

Same here too.
Compile works on (below version would be same with substrate playground)

rustup 1.23.1 (3df2264a9 2020-11-30)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.49.0-nightly (beb5ae474 2020-10-04)`

And, above issue happens on

rustup 1.24.3 (ce5817a94 2021-05-31)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.55.0 (c8dfcfe04 2021-09-06)`

Is there any solution for this?
Thank you

@hqwangningbo @zl910627 Fixed by #469

hi @stiiifff great working!

hi @stiiifff Thank you for your job! nice👍