Skip to content

fix: add npm install step before npm publish in release workflow#7473

Merged
DennisOSRM merged 1 commit intomasterfrom
fix/release-npm-install
Apr 12, 2026
Merged

fix: add npm install step before npm publish in release workflow#7473
DennisOSRM merged 1 commit intomasterfrom
fix/release-npm-install

Conversation

@DennisOSRM
Copy link
Copy Markdown
Collaborator

The prepare script runs husky, which is a devDependency. Without running npm install first, husky won't be available and npm publish will fail.

This was causing npm publish to fail with 'husky: not found' errors in the release workflow.

The prepare script runs husky, which is a devDependency. Without running
npm install first, husky won't be available and npm publish will fail.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 12, 2026 16:42
@DennisOSRM DennisOSRM merged commit 4abcdb0 into master Apr 12, 2026
24 checks passed
@DennisOSRM DennisOSRM deleted the fix/release-npm-install branch April 12, 2026 16:42
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the monthly release GitHub Actions workflow to ensure Node.js devDependencies are present before npm publish, preventing publish failures caused by the prepare script invoking husky.

Changes:

  • Add a dependency installation step before running npm publish in the monthly release workflow.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

exit 1
- name: Install dependencies
run: npm install
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using npm install here will run this repo’s install/prepare lifecycle scripts (see package.json), which can trigger node-pre-gyp install and potentially fall back to building OSRM from source. For a release/publish workflow this is slow and can fail if the prebuilt binary isn’t available yet or network is flaky. Prefer npm ci (deterministic) and consider adding --ignore-scripts so dependencies (including the husky binary) are installed without executing lifecycle scripts during the install step; npm publish can still run prepare afterwards with husky available.

Suggested change
run: npm install
run: npm ci --ignore-scripts

Copilot uses AI. Check for mistakes.
@DennisOSRM DennisOSRM restored the fix/release-npm-install branch April 12, 2026 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants