[PR #5397] [MERGED] fix: ensure npm is installed for Node.js base image #5188

Closed
opened 2026-03-17 02:39:34 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/5397
Author: @Leon-Luu
Created: 9/22/2025
Status: Merged
Merged: 9/24/2025
Merged by: @mirarifhasan

Base: nextHead: fix/npm_install_failed_2025_8_0


📝 Commits (2)

  • 410219a fix: ensure npm is installed for Node.js base image
  • fa0390e Apply suggestion from @Copilot

📊 Changes

1 file changed (+3 additions, -3 deletions)

View changed files

📝 prod.Dockerfile (+3 -3)

📄 Description

This PR updates the prod.Dockerfile to explicitly install npm alongside nodejs in the Alpine base image.

On Alpine, nodejs does not include npm by default, which caused build failures when running npm install -g ....

The fix adds npm to the apk add command, ensuring the Node.js environment is complete and compatible with subsequent global package installations.

Closes #
https://github.com/hoppscotch/hoppscotch/issues/5396

What's changed

Add npm to the apk add --no-cache nodejs npm curl tini bash command in the Node.js base stage.
This resolves /bin/sh: npm: not found errors during Docker builds in CI and local environments.

Notes to reviewers


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hoppscotch/hoppscotch/pull/5397 **Author:** [@Leon-Luu](https://github.com/Leon-Luu) **Created:** 9/22/2025 **Status:** ✅ Merged **Merged:** 9/24/2025 **Merged by:** [@mirarifhasan](https://github.com/mirarifhasan) **Base:** `next` ← **Head:** `fix/npm_install_failed_2025_8_0` --- ### 📝 Commits (2) - [`410219a`](https://github.com/hoppscotch/hoppscotch/commit/410219a232469b2ffef0de6b99847f5d6641410e) fix: ensure npm is installed for Node.js base image - [`fa0390e`](https://github.com/hoppscotch/hoppscotch/commit/fa0390e93cf1268f7df79dfb3ae5d0d9337a09cb) Apply suggestion from @Copilot ### 📊 Changes **1 file changed** (+3 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `prod.Dockerfile` (+3 -3) </details> ### 📄 Description <!-- Thanks for creating this pull request 🤗 Please make sure that the pull request is limited to one type (docs, feature, etc.) and keep it as small as possible. You can open multiple prs instead of opening a huge one. --> This PR updates the [prod.Dockerfile](vscode-file://vscode-app/c:/Users/LELUU2/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/workbench.html) to explicitly install npm alongside nodejs in the Alpine base image. On Alpine, nodejs does not include npm by default, which caused build failures when running npm install -g .... The fix adds npm to the apk add command, ensuring the Node.js environment is complete and compatible with subsequent global package installations. <!-- If this pull request closes an issue, please mention the issue number below --> Closes # <!-- Issue # here --> https://github.com/hoppscotch/hoppscotch/issues/5396 <!-- Add an introduction into what this PR tries to solve in a couple of sentences --> ### What's changed <!-- Describe point by point the different things you have changed in this PR --> Add npm to the apk add --no-cache nodejs npm curl tini bash command in the Node.js base stage. This resolves /bin/sh: npm: not found errors during Docker builds in CI and local environments. <!-- You can also choose to add a list of changes and if they have been completed or not by using the markdown to-do list syntax - [ ] Not Completed - [x] Completed --> ### Notes to reviewers <!-- Any information you feel the reviewer should know about when reviewing your PR --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 02:39:34 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#5188
No description provided.