File tree Expand file tree Collapse file tree 3 files changed +1817
-1797
lines changed
Expand file tree Collapse file tree 3 files changed +1817
-1797
lines changed Original file line number Diff line number Diff line change @@ -10,15 +10,17 @@ cd "${SCRIPT_DIR}/.."
1010# https://rustup.rs/
1111if ! hash rustup 2> /dev/null; then
1212 curl https://sh.rustup.rs -sSf | sh -s -- --no-modify-path -y
13- PATH=" $HOME /.cargo/bin:$PATH "
13+ export PATH=" $HOME /.cargo/bin:$PATH "
1414fi
1515
1616
1717# wasm-pack
1818# wasm-pack will be installed by npm package
1919# https://rustwasm.github.io/wasm-pack/installer/
2020if ! hash wasm-pack 2> /dev/null; then
21- curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
21+ # curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
22+ cargo install wasm-pack --version 0.9.1
23+ export PATH=" $HOME /.cargo/bin:$PATH "
2224fi
2325
2426# copy wasm-pack
4547
4648export PATH=$PATH
4749
50+
51+ node_version=$( node -v)
52+
53+
54+ if [[ " $node_version " =~ v([0-9]+)\. ([0-9]+)\. ([0-9]+) ]]; then
55+ major_version=${BASH_REMATCH[1]}
56+
57+ if [[ $major_version -ge 17 ]]; then
58+ echo " Node.js version is $node_version . Enabling legacy OpenSSL provider..."
59+ export NODE_OPTIONS=--openssl-legacy-provider
60+ else
61+ echo " Node.js version is $node_version . No need to enable legacy OpenSSL provider."
62+ fi
63+ else
64+ echo " Could not determine Node.js version."
65+ fi
66+
4867# yarn install
4968yarn install --frozen-lockfile --network-timeout 1000000
5069
You can’t perform that action at this time.
0 commit comments