Skip to content

fix: install dev deps before build in Dockerfile.prod#247

Open
ChaitanyaChute wants to merge 1 commit into
GitMetricsLab:mainfrom
ChaitanyaChute:bugfix/prod-build-dev-deps
Open

fix: install dev deps before build in Dockerfile.prod#247
ChaitanyaChute wants to merge 1 commit into
GitMetricsLab:mainfrom
ChaitanyaChute:bugfix/prod-build-dev-deps

Conversation

@ChaitanyaChute
Copy link
Copy Markdown

@ChaitanyaChute ChaitanyaChute commented May 15, 2026

Related Issue

Description

Fix the production Docker build by installing all dependencies before running npm run build in Dockerfile.prod. This ensures dev-only build tools (like Vite) are available during the build stage.


How Has This Been Tested?

  • Built the production image locally: docker build -f Dockerfile.prod .

Type of Change

  • Bug fix
  • New feature
  • Code style update
  • Breaking change
  • Documentation update

Summary by CodeRabbit

  • Chores
    • Updated Docker production build configuration for improved build reliability.

Review Change Stack

@netlify
Copy link
Copy Markdown

netlify Bot commented May 15, 2026

Deploy Preview for github-spy ready!

Name Link
🔨 Latest commit cc8c445
🔍 Latest deploy log https://app.netlify.com/projects/github-spy/deploys/6a06c68f97fedf00088eadab
😎 Deploy Preview https://deploy-preview-247--github-spy.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 15, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 24e0faa9-faf3-4f59-9eee-5ceda795e142

📥 Commits

Reviewing files that changed from the base of the PR and between 56e17a3 and cc8c445.

📒 Files selected for processing (1)
  • Dockerfile.prod

📝 Walkthrough

Walkthrough

The production Dockerfile build stage now installs full npm dependencies including dev tools before copying the application source and running the build, fixing a bug where build commands failed due to missing development dependencies.

Changes

Production Docker Build Configuration

Layer / File(s) Summary
npm install and source copy for build stage
Dockerfile.prod
The build stage switches from npm install --production to npm install to include dev dependencies required for the npm build command, and copies application files before running the build.

🎯 1 (Trivial) | ⏱️ ~2 minutes

🐰 A rabbit hops with glee,
Dev deps now in the spree,
Docker builds just right,
Ship to prod tonight! 🚀

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: installing dev dependencies before the build step in the production Dockerfile.
Description check ✅ Passed The PR description includes all required sections from the template with appropriate detail: related issue, clear description of the fix, testing approach, and correct bug fix classification.
Linked Issues check ✅ Passed The code changes directly address issue #243 by modifying Dockerfile.prod to install all dependencies (including dev dependencies) before running npm build, resolving the build failure.
Out of Scope Changes check ✅ Passed All changes are narrowly focused on fixing the Dockerfile.prod build process as specified in issue #243; no extraneous modifications are present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐛 Bug Report: Production Docker build fails because dev dependencies are excluded before build step

1 participant