Skip to content
This repository has been archived by the owner on Aug 20, 2020. It is now read-only.

error[E0424] building substrate template for first tutorial #45

Closed
01willtx opened this issue May 31, 2020 · 5 comments
Closed

error[E0424] building substrate template for first tutorial #45

01willtx opened this issue May 31, 2020 · 5 comments

Comments

@01willtx
Copy link

I'm trying to complete the 1st tutorial from https://www.substrate.io/tutorials/create-your-first-substrate-chain/v2.0.0-rc2

The following error from running the command cargo build --release resulted

  error[E0424]: expected value, found module `self`
      --> /Users/wlopez/.cargo/git/checkouts/substrate- 7e08433d4c370a21/45b9f0a/frame/support/src/traits.rs:913:11
      |
  911 | / bitmask! {
  912 | |     /// Reasons for moving funds out of an account.
  913 | |     #[derive(Encode, Decode)]
      | |              ^^^^^^ `self` value is a keyword only available in methods with a `self` parameter
  914 | |     pub mask WithdrawReasons: i8 where
  ...   |
  929 | |     }
  930 | | }
     | |_- this function has a `self` parameter, but a macro invocation can only access identifiers it   receives from parameters
      |
       = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
@01willtx 01willtx changed the title error building substrate template for first tutorial error[E0424] building substrate template for first tutorial May 31, 2020
@herou
Copy link

herou commented May 31, 2020

I guess this can help #44

@danforbes
Copy link
Contributor

Thank you, @herou. I will consider updating the instructions for Windows to mention this since it seems to be a common problem.

@01willtx
Copy link
Author

01willtx commented May 31, 2020

@danforbes This isn't solely a windows problem, I'm on MacOS Catalina 10.15.5. I'll try the answer provided in issue #44 and report back. Thanks @herou !

Also, this: rustup target add wasm32-unknown-unknown --toolchain nightly-2020-05-15 not a big deal but if I were to come across a package/library with "unknown" in it's naming I would not use it and it would turn me off to the library. I expect anything related to blockchain tech to project the warm and fuzzies of the highest security. It's just a name, but seems sloppy and if I didn't come across it via the tutorial I wouldn't trust it. :-)

@danforbes
Copy link
Contributor

The unknown target is not "a Substrate thing", it is "a Rust thing" that's related to compiling to Wasm, I believe. Ref: rust-lang/rust#45905.

@01willtx
Copy link
Author

Thanks @danforbes! That worked, I was able to compile successfully.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants