mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-09-14 14:01:28 +08:00
f51c11e2c7
77 tests in the latest run failed at module-load with
'Cannot find module ../build/Release/sharp-linux-x64.node'
Root cause: sharp is a transitive dep via @xenova/transformers and
@huggingface/transformers (both deps of @claude-flow/embeddings).
v3/package.json has 'neverBuiltDependencies: [sharp]' — so pnpm
never fetches sharp's prebuilt binary in any environment, including
CI. The threads pool masked this (single Node process, fast-fail
caught and suppressed earlier in some runs); the forks pool exposes
it (each test file is a fresh process; sharp's load fails fresh).
No test in this suite exercises sharp's image-processing behavior —
it's purely a bystander pulled in by transformers' module graph.
Add a global vi.mock('sharp', ...) in __tests__/setup.ts so the
import resolves to a no-op throwing stub. Tests that load
transformers transitively now succeed at module-load; if any test
ever does need real sharp, vi.unmock('sharp') in that file.
Co-Authored-By: RuFlo <ruv@ruv.net>
1.3 KiB
1.3 KiB