Skip to content

Commit

Permalink
Use rosetta to attempt to install x64 deps into node_modules folder
Browse files Browse the repository at this point in the history
  • Loading branch information
younglim committed Aug 22, 2024
1 parent 671d59e commit df2adc6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
3 changes: 2 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@
"micromatch": "github:micromatch/micromatch.git#4.0.7"
},
"optionalDependencies": {
"@napi-rs/canvas-darwin-arm64": "0.1.53",
"@napi-rs/canvas-darwin-arm64": "^0.1.53",
"@napi-rs/canvas-darwin-x64": "0.1.53",
"@napi-rs/canvas-win32-x64-msvc": "0.1.53",
"@napi-rs/canvas-linux-x64-gnu": "0.1.53",
"@napi-rs/canvas-linux-arm64-gnu": "0.1.53",
"@napi-rs/canvas-linux-arm64-musl": "0.1.53",
"@napi-rs/canvas-linux-x64-musl": "0.1.53"
"@napi-rs/canvas-linux-x64-gnu": "0.1.53",
"@napi-rs/canvas-linux-x64-musl": "0.1.53",
"@napi-rs/canvas-win32-x64-msvc": "0.1.53"
},
"scripts": {
"build": "npm run copyfiles && tsc",
Expand Down
7 changes: 7 additions & 0 deletions scripts/install_purple_dependencies.command
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,12 @@ fi
echo "Installing Node dependencies to $PWD"
npm install --force --omit=dev

# Add additional canvas dependency in x64 mode
if [ "$(uname -m)" = "arm64" ]; then
# Prepend node-mac-x64 to the PATH
export PATH="$PWD/nodejs-mac-x64/bin:$PATH"
arch -x86_64 npm install --force --omit=dev
fi

echo "Build TypeScript"
npm run build || true

0 comments on commit df2adc6

Please sign in to comment.