fix(deps): add missing sharp dependencies#593
Conversation
|
ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughTwo development dependencies, ChangesDependency addition for native module build
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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. Comment |
91d3fc2 to
635098b
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
package.json (1)
31-32: ⚡ Quick winThis fix may be insufficient when
libvipsis globally installed (e.g. viabrew install vips) on Node 24.When
libvipsis globally installed,sharpdetects it and attempts to build from source instead of using prebuilt binaries. This build fails on Node.js 24 LTS with a C++ compilation error (NewOrCopynot found inNapi::Buffer) — an error that addingnode-addon-apidoes not resolve. The workaround for that case isSHARP_IGNORE_GLOBAL_LIBVIPS=1 npm install, which forces the prebuilt binary download.Consider documenting this environment-specific workaround in the README or
.env.example, and/or adding it to an.npmrc:sharp_ignore_global_libvips=true🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@package.json` around lines 31 - 32, The package.json change adding node-addon-api/node-gyp doesn't address failures when libvips is globally installed and sharp builds from source on Node 24; update docs and config to document and enforce the workaround by (a) adding a note to README and .env.example explaining to set SHARP_IGNORE_GLOBAL_LIBVIPS=1 before npm install when brew/other global libvips is present, and (b) add an .npmrc entry sharp_ignore_global_libvips=true to force use of prebuilt sharp binaries during install; reference the package.json dependency names (node-addon-api, node-gyp) and the env var SHARP_IGNORE_GLOBAL_LIBVIPS in the documentation so maintainers know why this is needed.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@package.json`:
- Around line 31-32: Update the root package.json devDependency "node-gyp" from
"^12.2.0" to "^12.3.0": locate the "node-gyp" entry in package.json and change
its version string to "^12.3.0", then run your package manager (npm/yarn/pnpm)
to refresh the lockfile and install updated devDependencies so the repo uses
node-gyp 12.3.0.
---
Nitpick comments:
In `@package.json`:
- Around line 31-32: The package.json change adding node-addon-api/node-gyp
doesn't address failures when libvips is globally installed and sharp builds
from source on Node 24; update docs and config to document and enforce the
workaround by (a) adding a note to README and .env.example explaining to set
SHARP_IGNORE_GLOBAL_LIBVIPS=1 before npm install when brew/other global libvips
is present, and (b) add an .npmrc entry sharp_ignore_global_libvips=true to
force use of prebuilt sharp binaries during install; reference the package.json
dependency names (node-addon-api, node-gyp) and the env var
SHARP_IGNORE_GLOBAL_LIBVIPS in the documentation so maintainers know why this is
needed.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: b90b79f2-d9d4-4458-8030-1625b894d333
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (1)
package.json
635098b to
84cca1d
Compare
Fixes #524
Summary by CodeRabbit