Skip to content

Commit

Permalink
Fix wasm-pack not found error
Browse files Browse the repository at this point in the history
  • Loading branch information
cse0001 committed Nov 12, 2024
1 parent a87c22c commit 681af9e
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions frontend/scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,24 @@ 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
# fi
if ! hash wasm-pack 2>/dev/null; then
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
fi

# copy wasm-pack
destination="$HOME/.config/wasm-pack-nodejs/bin"
source=$(which wasm-pack)
if [ -z "$source" ]; then
echo "wasm-pack is not installed or not found in PATH"
else
echo "$source"
if [ -d "$destination" ]; then
cp "$source" "$destination"
else
mkdir -p "$destination"
cp "$source" "$destination"
fi
fi


# yarn
Expand Down

0 comments on commit 681af9e

Please sign in to comment.