I have been trying to implement pallet-nft-fractionalization with the substrate-node-template, Since pallet-nft-fractionalization was released in the last few months had to change the branch of all the pallets to branch = "polkadot-v0.9.43" despite doing all the changes, I'm still facing the issue that is ::

    error: the wasm*-unknown-unknown targets are not supported by default, you may need to enable the "js" feature. For more information see: https://docs.rs/getrandom/#webassembly-support
     --> /Users/XXXXXX/.cargo/registry/src/index.crates.io-6f17d22bba15001f/getrandom-0.2.10/src/lib.rs:285:9
  285 | /         compile_error!("the wasm*-unknown-unknown targets are not supported by \
  286 | |                         default, you may need to enable the \"js\" feature. \
  287 | |                         For more information see: \
  288 | |                         https://docs.rs/getrandom/#webassembly-support");
      | |________________________________________________________________________^

  error[E0433]: failed to resolve: use of undeclared crate or module `imp`
     --> /Users/XXXXXX/.cargo/registry/src/index.crates.io-6f17d22bba15001f/getrandom-0.2.10/src/lib.rs:341:9
  341 |         imp::getrandom_inner(dest)?;
      |         ^^^ use of undeclared crate or module `imp`

  For more information about this error, try `rustc --explain E0433`.
  error: could not compile `getrandom` (lib) due to 2 previous errors

I have been trying to solve this issue for a while any help would be welcomed :)

  • try checking if you are setting all you pallet imports as default-features to false. substrate.stackexchange.com/questions/4174/…
    – Xavier
    Jul 13, 2023 at 5:19
  • @Xavier Yes all of my pallets imports are set to default-features = false Jul 13, 2023 at 5:27
  • Please install rustup target add wasm32-unknown-unknown
    – CocDap
    Jul 13, 2023 at 5:43
  • would be useful to also show your cargo.toml file for the runtime in your question
    – Xavier
    Jul 13, 2023 at 6:06
  • As suggested would be great if you can show a bit more of your code for us to try to replicate it
    – Alex Bean
    Jul 17, 2023 at 9:17

1 Answer 1


It was a bit tricky to find a solution, thanks to the parity team member who helped with this problem.

When working with pallet-nft-fractionalization which is available only after v0.9.43.we would have to upgrade the runtime of the node to version v0.9.43. Along with that, we would have to make minor runtime changes, which can be found in this PR: https://github.com/sacha-l/substrate-nfts-node/pull/4/files if you would like to get a basic template for NFT + fractionalization, you can use https://github.com/sacha-l/substrate-nfts-node/ repo to get started.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.