Tutorial 4: kittes pallet serde import error on both monthly-2021-11-1 and monthly-2021-11-0
See original GitHub issue_Originally posted by @luatnd in https://github.com/substrate-developer-hub/substrate-docs/issues/516#issuecomment-973129038_
For the latest guide, I got this error on the tutorial 4: kittes pallet: if I using monthly-2021-10
error[E0463]: can't find crate for `serde`
--> pallets/kitties/src/lib.rs:42:37
|
42 | #[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
| ^^^^^^^^^ can't find crate
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)
My solution is update all dependencies to latest tag following this commit
But… without success 😄
Also the case for me using the newly updated kickstart-substrate
that has frame-system
monthly-2021-11-1
‘4.0.0-dev’
Issue Analytics
- State:
- Created 2 years ago
- Comments:7
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
👍🏻 Yes - good call.
Thanks @sacha-l - adding a
serde
dependency into the pallet Cargo.toml worked and I can compile my code. I was under the impression that frame_support was going to handle the serde functions because of this line:As for the tutorial documentation, definitely worth prompting the user to add the serde dependency in step 2 of this section or instead editing the default pallet
Cargo.toml
that comes with the kickstart so they don’t have to do it themselves.