Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix source code installation bug #1285

Merged
merged 3 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 21 additions & 2 deletions frontend/scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,17 @@ cd "${SCRIPT_DIR}/.."
# https://rustup.rs/
if ! hash rustup 2>/dev/null; then
curl https://sh.rustup.rs -sSf | sh -s -- --no-modify-path -y
PATH="$HOME/.cargo/bin:$PATH"
export PATH="$HOME/.cargo/bin:$PATH"
fi


# wasm-pack
# wasm-pack will be installed by npm package
# https://rustwasm.github.io/wasm-pack/installer/
if ! hash wasm-pack 2>/dev/null; then
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
# curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
cargo install wasm-pack --version 0.9.1
export PATH="$HOME/.cargo/bin:$PATH"
fi

# copy wasm-pack
Expand All @@ -45,6 +47,23 @@ fi

export PATH=$PATH


node_version=$(node -v)


if [[ "$node_version" =~ v([0-9]+)\.([0-9]+)\.([0-9]+) ]]; then
major_version=${BASH_REMATCH[1]}

if [[ $major_version -ge 17 ]]; then
echo "Node.js version is $node_version. Enabling legacy OpenSSL provider..."
export NODE_OPTIONS=--openssl-legacy-provider
else
echo "Node.js version is $node_version. No need to enable legacy OpenSSL provider."
fi
else
echo "Could not determine Node.js version."
fi

# yarn install
yarn install --frozen-lockfile --network-timeout 1000000

Expand Down
Loading
Loading