Skip to content

Commit

Permalink
Use npm install force for package to be installed on multi-platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
younglim committed Aug 22, 2024
1 parent 96a3fee commit 671d59e
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ ENV PLAYWRIGHT_BROWSERS_PATH="/opt/ms-playwright"
ENV PATH="/opt/verapdf:${PATH}"

# Install dependencies
RUN npm ci --omit=dev
RUN npm install --force --omit=dev

# Install Playwright browsers
RUN npx playwright install chromium webkit
Expand Down
44 changes: 38 additions & 6 deletions package-lock.json

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

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@
"@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-gnu": "0.1.53",
"@napi-rs/canvas-linux-arm64-musl": "0.1.53",
"@napi-rs/canvas-linux-x64-musl": "0.1.53"
},
"scripts": {
"build": "npm run copyfiles && tsc",
Expand Down
2 changes: 1 addition & 1 deletion scripts/install_purple_dependencies.command
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ if [ -d "node_modules" ]; then
fi

echo "Installing Node dependencies to $PWD"
npm ci
npm install --force --omit=dev

echo "Build TypeScript"
npm run build || true
4 changes: 2 additions & 2 deletions scripts/install_purple_dependencies.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ if (Test-Path -Path .\jdk -PathType Container) {
# Install Node dependencies
if (Test-Path purple-a11y) {
Write-Output "Installing node dependencies"
& ".\a11y_shell_ps.ps1" "cd purple-a11y;npm ci --force;cd .."
& ".\a11y_shell_ps.ps1" "cd purple-a11y;npm install --force --omit=dev;cd .."

# Omit installing Playwright browsers as it is not reuqired
# Write-Output "Install Playwright browsers"
Expand All @@ -87,7 +87,7 @@ if (Test-Path purple-a11y) {

if (Test-Path package.json) {
Write-Output "Installing node dependencies"
& ".\a11y_shell_ps.ps1" "npm ci --force"
& ".\a11y_shell_ps.ps1" "npm install --force --omit=dev"

Write-Output "Install Playwright browsers"
& "npx playwright install chromium"
Expand Down

0 comments on commit 671d59e

Please sign in to comment.