You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Installation fails with: could not find derive_prelude in swarm #163
Compiling sc-network v0.10.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.32#5ea6d953)
error[E0433]: failed to resolve: could not find `derive_prelude` in `swarm`
--> /Users/wottpal/.cargo/git/checkouts/substrate-7e08433d4c370a21/5ea6d95/client/network/src/behaviour.rs:58:10
|
58 | #[derive(NetworkBehaviour)]
| ^^^^^^^^^^^^^^^^ could not find `derive_prelude` in `swarm`
|
= note: this error originates in the derive macro `NetworkBehaviour` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0432]: unresolved import `libp2p`
--> /Users/wottpal/.cargo/git/checkouts/substrate-7e08433d4c370a21/5ea6d95/client/network/src/behaviour.rs:58:10
|
58 | #[derive(NetworkBehaviour)]
| ^^^^^^^^^^^^^^^^ could not find `derive_prelude` in `swarm`
|
= note: this error originates in the derive macro `NetworkBehaviour` (in Nightly builds, run with -Z macro-backtrace for more info)
I brew-installed protobuf before, so it's not a duplicate of #161.
Before, I used v0.21.0 for WeightsV1, which installed successfully.
@athei When compiling the substrate node is also encountering the same problem
the command cargo build --locked -p file://RustCode/parachain/node#my-node@0.01-release
Compiling sc-network v0.10.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.32#5ea6d953)
Compiling sc-informant v0.10.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.32#5ea6d953)
error[E0433]: failed to resolve: could not find `derive_prelude` in `swarm`
--> /root/.cargo/git/checkouts/substrate-7e08433d4c370a21/5ea6d95/client/network/src/behaviour.rs:58:10
|
58 | #[derive(NetworkBehaviour)]
| ^^^^^^^^^^^^^^^^ could not find `derive_prelude` in `swarm`
|
= note: this error originates in the derive macro `NetworkBehaviour` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0432]: unresolved import `libp2p`
--> /root/.cargo/git/checkouts/substrate-7e08433d4c370a21/5ea6d95/client/network/src/behaviour.rs:58:10
|
58 | #[derive(NetworkBehaviour)]
| ^^^^^^^^^^^^^^^^ could not find `derive_prelude` in `swarm`
Got the same error, when compiling my Parachain node with the contracts pallet.
Using the sc-network in v0.9.32.
error[E0433]: failed to resolve: could not find `derive_prelude` in `swarm`
--> /home/amrm/.cargo/git/checkouts/substrate-7e08433d4c370a21/5ea6d95/client/network/src/behaviour.rs:58:10
|
58 | #[derive(NetworkBehaviour)]
| ^^^^^^^^^^^^^^^^ could not find `derive_prelude` in `swarm`
|
= note: this error originates in the derive macro `NetworkBehaviour` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0432]: unresolved import `libp2p`
--> /home/amrm/.cargo/git/checkouts/substrate-7e08433d4c370a21/5ea6d95/client/network/src/behaviour.rs:58:10
|
58 | #[derive(NetworkBehaviour)]
| ^^^^^^^^^^^^^^^^ could not find `derive_prelude` in `swarm`
| = note: this error originates in the derive macro `NetworkBehaviour` (in Nightly builds, run with -Z macro-backtrace for more info)
Some errors have detailed explanations: E0432, E0433.
For more information about an error, try `rustc --explain E0432`.
error: could not compile `sc-network` due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
Hey, it was a bug in the libp2p. libp2p/rust-libp2p#3178
Fixed by executing a cargo clean and deleting my cargo.lock. And after, just did a cargo build --release SE Discussion
Activity
ganesh1997oli commentedon Nov 29, 2022
Exactly, I'm also facing same issue
athei commentedon Nov 29, 2022
I can reproduce. It is probably a dependency that violates semver. Add the
--lockedflag to the installation command line.Marky-Shi commentedon Nov 29, 2022
@athei When compiling the substrate node is also encountering the same problem
the command
cargo build --locked -p file://RustCode/parachain/node#my-node@0.01-releaseamrm121 commentedon Nov 29, 2022
Got the same error, when compiling my Parachain node with the contracts pallet.
Using the
sc-networkin v0.9.32.amrm121 commentedon Nov 29, 2022
Hey, it was a bug in the
libp2p. libp2p/rust-libp2p#3178Fixed by executing a
cargo cleanand deleting mycargo.lock. And after, just did acargo build --releaseSE Discussion
wottpal commentedon Feb 24, 2023
Can be closed I think.
ganesh1997oli commentedon Feb 24, 2023
yes now it works fine🙂
ganesh1997oli commentedon Feb 24, 2023
yes now it works fine🙂