I am trying to add Frontier as a dependency in my substrate-parachain-template.
Compiling sp-npos-elections v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.25#3348e144)
error: cannot find macro `vec` in this scope
--> /home/user2038/.cargo/git/checkouts/substrate-7e08433d4c370a21/3348e14/primitives/npos-elections/src/reduce.rs:604:21
|
604 | let min_edge = vec![min_voter, min_target];
| ^^^
|
= note: consider importing one of these items:
codec::alloc::vec
crate::vec
scale_info::prelude::vec
sp_std::vec
error: cannot find macro `vec` in this scope
--> /home/user2038/.cargo/git/checkouts/substrate-7e08433d4c370a21/3348e14/primitives/npos-elections/src/phragmms.rs:52:20
|
52 | let mut winners = vec![];
| ^^^
|
= note: consider importing one of these items:
codec::alloc::vec
crate::vec
scale_info::prelude::vec
sp_std::vec
From this post https://stackoverflow.com/questions/70477868/substrate-cannot-find-type-vec-in-this-scope, perhaps I need to make a pallet to fix this error? That sounds weird...
It seems this solves it: https://users.rust-lang.org/t/whats-different-between-these-two-features-style/47292/5 with reference https://github.com/paritytech/substrate/blob/master/utils/wasm-builder/src/wasm_project.rs#L324-L349
but how can I apply that in my project???
Is there another solution? How can I solve this?