Fix npm install dependency resolution issues #3

Merged
overspend1 merged 1 commits from claude/fix-npm-install-01PgzBPg7kQLEAFNGdtDe5fY into main 2025-11-21 12:54:55 +01:00
overspend1 commented 2025-11-21 12:54:45 +01:00 (Migrated from github.com)

Backend fix:

  • Add python3-dev to build dependencies for psutil compilation
  • psutil requires Python development headers to build C extensions

Frontend fix:

  • Explicitly copy package-lock.json to ensure it's available for npm ci
  • Add verification step to confirm package-lock.json exists before npm ci
  • Prevents "npm ci" usage errors due to missing lock file

Summary by CodeRabbit

  • Chores
    • Enhanced build process reliability through improved dependency verification
    • Updated build configuration to ensure consistent package management and environment setup

✏️ Tip: You can customize this high-level summary in your review settings.

Backend fix: - Add python3-dev to build dependencies for psutil compilation - psutil requires Python development headers to build C extensions Frontend fix: - Explicitly copy package-lock.json to ensure it's available for npm ci - Add verification step to confirm package-lock.json exists before npm ci - Prevents "npm ci" usage errors due to missing lock file <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Enhanced build process reliability through improved dependency verification * Updated build configuration to ensure consistent package management and environment setup <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai -->
coderabbitai[bot] commented 2025-11-21 12:54:53 +01:00 (Migrated from github.com)

Caution

Review failed

The pull request is closed.

Walkthrough

Two Dockerfile modifications: the backend stage adds python3-dev to dependencies for building Python packages, while the frontend stage changes package file copying from wildcard pattern to explicit filenames and adds a file existence check before running npm ci.

Changes

Cohort / File(s) Summary
Backend build dependencies
backend/Dockerfile
Added python3-dev to builder stage apt-get install command; updated comment to reference building Python packages
Frontend package verification and installation
frontend/Dockerfile
Changed package file copy from package*.json wildcard to explicit package.json package-lock.json; added existence check test -f package-lock.json before running npm ci; updated comment to reflect verification step

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Straightforward dependency addition in backend Dockerfile
  • Explicit file copying replaces wildcard pattern with defensive file existence check in frontend Dockerfile

Poem

🐰 A builder stage grows strong with dev tools so fine,
Package-lock verified before install time,
No wildcards needed—explicit paths we choose,
With Python headers and npm checks, we can't lose! 📦

Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch claude/fix-npm-install-01PgzBPg7kQLEAFNGdtDe5fY

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fd904ab547 and 8f83bacdb9.

📒 Files selected for processing (2)
  • backend/Dockerfile (1 hunks)
  • frontend/Dockerfile (1 hunks)

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.

<!-- This is an auto-generated comment: summarize by coderabbit.ai --> <!-- This is an auto-generated comment: failure by coderabbit.ai --> > [!CAUTION] > ## Review failed > > The pull request is closed. <!-- end of auto-generated comment: failure by coderabbit.ai --> <!-- walkthrough_start --> ## Walkthrough Two Dockerfile modifications: the backend stage adds `python3-dev` to dependencies for building Python packages, while the frontend stage changes package file copying from wildcard pattern to explicit filenames and adds a file existence check before running `npm ci`. ## Changes | Cohort / File(s) | Summary | |---|---| | **Backend build dependencies** <br> `backend/Dockerfile` | Added `python3-dev` to builder stage `apt-get install` command; updated comment to reference building Python packages | | **Frontend package verification and installation** <br> `frontend/Dockerfile` | Changed package file copy from `package*.json` wildcard to explicit `package.json package-lock.json`; added existence check `test -f package-lock.json` before running `npm ci`; updated comment to reflect verification step | ## Estimated code review effort 🎯 2 (Simple) | ⏱️ ~8 minutes - Straightforward dependency addition in backend Dockerfile - Explicit file copying replaces wildcard pattern with defensive file existence check in frontend Dockerfile ## Poem > 🐰 A builder stage grows strong with dev tools so fine, > Package-lock verified before install time, > No wildcards needed—explicit paths we choose, > With Python headers and npm checks, we can't lose! 📦✨ <!-- walkthrough_end --> <!-- finishing_touch_checkbox_start --> <details> <summary>✨ Finishing touches</summary> <details> <summary>🧪 Generate unit tests (beta)</summary> - [ ] <!-- {"checkboxId": "f47ac10b-58cc-4372-a567-0e02b2c3d479", "radioGroupId": "utg-output-choice-group-unknown_comment_id"} --> Create PR with unit tests - [ ] <!-- {"checkboxId": "07f1e7d6-8a8e-4e23-9900-8731c2c87f58", "radioGroupId": "utg-output-choice-group-unknown_comment_id"} --> Post copyable unit tests in a comment - [ ] <!-- {"checkboxId": "6ba7b810-9dad-11d1-80b4-00c04fd430c8", "radioGroupId": "utg-output-choice-group-unknown_comment_id"} --> Commit unit tests in branch `claude/fix-npm-install-01PgzBPg7kQLEAFNGdtDe5fY` </details> </details> <!-- finishing_touch_checkbox_end --> --- <details> <summary>📜 Recent review details</summary> **Configuration used**: CodeRabbit UI **Review profile**: CHILL **Plan**: Pro <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between fd904ab547f510fe42c8d476feda8edf20253c18 and 8f83bacdb942a52a6afffcc88a05488c7f3b6e98. </details> <details> <summary>📒 Files selected for processing (2)</summary> * `backend/Dockerfile` (1 hunks) * `frontend/Dockerfile` (1 hunks) </details> </details> <!-- tips_start --> --- Thanks for using [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=overspend1/bot-dashboard&utm_content=3)! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. <details> <summary>❤️ Share</summary> - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code) </details> <sub>Comment `@coderabbitai help` to get the list of available commands and usage tips.</sub> <!-- tips_end --> <!-- internal state start --> <!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bgFyQAOFk+AIwBWJBrngA3EsgEBPRvlqU0AgfFwA6NPEgQAfACgjoCEYDEZyAAUASpETZWaCrKPR1AGxJcAYvAAekBjczCgYiLhoHh6QStxkShgM8hTS+B548PhYSA7SbgjI3NjRkKkAjtjSuOi0tMgAZgHSkA34fAJoDADWCegY9A0U2TQDkALY8B70ESTcyAS1tKmIyHEJZMllaRni2f30E1OD2hkrGkYAQl29YwywmKSIHAZQAIJ1PLK4sNkAzGAlBJIIsjtNYnMNkl4C1FlEPPgAO48BziGKLJjMbhTEgXKA2ahZDBRbwozIxCqTFbWb6/LBAkgIkLsSCwEhoJQUBb4caTcHqZAAYUgJH8o0QRMQFwMPmGGFG9Huj2kLygAFF/NwPPAGJ55ExuPJuDc0KQwAiehohIh9jaUDVUGgJKcVF5Wu0giFGPA8ZAPvQ0JApBR4E0GITbTRuCCeUwME0KKFjT1TSRzfhLdb9qKkLgZCQ2qkytgMBh4BgiJ7QrrfQS9sSvFwrKkpPLkMFqzpKMMuSCHjUMwxsHxEWysD8SJALd1WjiUMhmLly0RpQB5Cd8NiRWjUNCq6x2Mx/cby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9oVUIAnGqmj4oNTKGgZq21nDyH3loqguUeoFX6kAA== --> <!-- internal state end -->
Sign in to join this conversation.