-4

I was able to build and run substrate-node-template from the instructions from the cloned repo, following the instructions at https://substrate.dev/docs/en/tutorials/create-your-first-substrate-chain/

However when I try to do the follow on tutorial of adding the nicks pallet I get the following error. <Rust nightly not installed, please install it!>.

This is right after I run the command -

WASM_BUILD_TOOLCHAIN=nightly-2020-10-05 cargo build --release

I tried running the command -

WASM_BUILD_TOOLCHAIN=nightly-2021-02-12 cargo build --release

I get the same error.

Here is what I currently have -

$ rustup update

info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'

info: syncing channel updates for 'nightly-x86_64-unknown-linux-gnu'

info: checking for self-updates

stable-x86_64-unknown-linux-gnu unchanged - rustc 1.50.0 (cb75ad5db 2021-02-10)

nightly-x86_64-unknown-linux-gnu unchanged - rustc 1.52.0-nightly (e9920ef77 2021-02-11)

info: cleaning up downloads & tmp directories

Previously, I had built the cloned repo and everything worked fine.

Any help resolving this is appreciated.

  • Instead of using the command - WASM_BUILD_TOOLCHAIN I just ran make build on it and everything works fine. Why do the instructions ask you to run the above command? – John Aschenbrenner Feb 13 '21 at 19:29
  • 1
    you first must install the toolchain, as the error says. ;) This is no longer required in v2.0.1 and v3.0.0 for substrate. Check the most recent version of the node template. Also to get the right toolchain on any node installed, you can do make init - this will get the right rustup stuff for you. – Nuke Feb 15 '21 at 17:54
  • Thanks, but what I don't understand is what is the point of WASM_BUILD_TOOLCHAIN=nightly-2020-10-05 cargo build --release When I run the commands make init and make build everything works fine. I have node-template-runtime v2.0.1 installed. I am not that great at using build tools, just trying to understand. Thanks again. – John Aschenbrenner Feb 16 '21 at 18:28
  • 1
    do `rustup show` this shows your installed toolchains. Inspect the makefile, it should have the correct dated version in there. https://lib.rs/crates/substrate-wasm-builder see this doc on env variables that the wasm-builder uses internally. – Nuke Feb 17 '21 at 16:55

2 Answers2

8

I had the same problem but i fixed it by updating rust and target "wasm" to nightly build

rustup update
rustup update nightly
rustup target add wasm32-unknown-unknown --toolchain nightly
sumsumcity
  • 217
  • 4
  • 3
0

Running only cargo run --release -- --dev --tmp without WASM_BUILD_TOOLCHAIN=nightly-2020-10-05 did the trick for me!

Pete
  • 1
  • 1