0
votes

I have followed the instructions for setting up my windows based computer but when I try to initialize WebAssembly build environment from powershell with

make init

show this error:

./scripts/init.sh
process_begin: CreateProcess(NULL, env bash D:\Blockchain-substrate\substrate-node-template\scripts\init.sh, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [Makefile:3: init] Error 2

The init.sh file contain

#!/usr/bin/env bash

set -e

echo "*** Initializing WASM build environment ***"

if [ -z $CI_PROJECT_NAME ] ; then
    rustup update nightly
    rustup update stable
fi

rustup target add wasm32-unknown-unknown --toolchain nightly

The installed toolchains seems to be fine

stable-x86_64-pc-windows-msvc
nightly-2020-10-01-x86_64-pc-windows-msvc
nightly-2021-03-15-x86_64-pc-windows-msvc
nightly-x86_64-pc-windows-msvc (default)

installed targets for active toolchain
--------------------------------------

wasm32-unknown-unknown
x86_64-pc-windows-msvc

active toolchain
----------------

nightly-x86_64-pc-windows-msvc (default)
rustc 1.52.0-nightly (107896c32 2021-03-15)

I have read everything that google could bring with my queries but no solved it, so I would appreciate your help

2
Did you try just running the individual commands on your machine? In general my guess is that the BASH script does not work on windows. - Shawn Tabrizi
Of note: the devhub just got updated to use substrate v3 that deprecates the make file, and strongly suggests using WSL, not native windows, to develop: substrate.dev/docs/en/knowledgebase/getting-started/#1a-windows . Would you be willing to try it this way? We are able to support much more quickly and easily if so - NukeManDan
please start again with the node template v3.0.0 for best results while learning: github.com/substrate-developer-hub/substrate-node-template/tree/… - NukeManDan
@NukeManDan thanks for your support, i will to install WSL to see what happens. - Adrian
As @NukeManDan indicated, using WSL and the substrate node template V3, I already have the blockchain working. Thanks - Adrian

2 Answers

0
votes

From the comments:

Of note: the devhub just got updated to use substrate v3 that deprecates the make file, and strongly suggests using WSL, not native windows, to develop: substrate.dev/docs/en/knowledgebase/getting-started/#1a-windows .

This seems to be the best path for other windows users looking :)

0
votes

Substrate development for windows is not properly supported.
Powershell and Command Prompt always give errors, what you can do is install WSL, then install Ubuntu and access the WSL from Visual Studio Code itself. Check out this article for detailed steps.