open-swe icon indicating copy to clipboard operation
open-swe copied to clipboard

Fix Sharp Native Dependencies for macOS ARM64 in Docs Application

Open barvhaim opened this issue 8 months ago • 1 comments

The docs development server (@open-swe/docs:dev) fails to start due to a missing Sharp module dependency on macOS ARM64. The error occurs when trying to load the native Sharp library for image processing.

Error Details

Error: Could not load the "sharp" module using the darwin-arm64 runtime ERR_DLOPEN_FAILED: dlopen(.../@img/sharp-darwin-arm64/lib/sharp-darwin-arm64.node, 0x0001): Library not loaded: @rpath/libvips-cpp.42.dylib

Steps to Reproduce

  1. Run yarn dev from project root
  2. Observe that docs service fails while other services start successfully

Expected Behavior

All development servers should start without errors, including the docs application.

Environment

  • Platform: macOS (darwin)
  • Architecture: ARM64
  • Node.js: v22.17.0
  • Package Manager: Yarn v1.22.19

Impact

  • Docs development server cannot start
  • Other services (agent, web, cli) work correctly
  • Blocks documentation development workflow
node_modules/sharp/lib/sharp.js:113
  throw new Error(help.join('\n'));
        ^

Error: Could not load the "sharp" module using the darwin-arm64 runtime
ERR_DLOPEN_FAILED: dlopen(/projects/open-swe/node_modules/favicons/node_modules/@img/sharp-darwin-arm64/lib/sharp-darwin-arm64.node, 0x0001): Library not loaded: @rpath/libvips-cpp.42.dylib

barvhaim avatar Aug 17 '25 14:08 barvhaim

Hi @barvhaim I'm able to run the docs server locally without issues on my M3 mac. If you install the mintlify server locally (see here) and try running mint dev from apps/docs do you get the same error? If so, this would be an issue on the Mintlify CLI, not Open SWE.

bracesproul avatar Aug 19 '25 18:08 bracesproul