Files
Reuven ea8cbf697b fix(@claude-flow/embeddings@3.0.0-alpha.16): Windows ERR_PACKAGE_PATH_NOT_EXPORTED
Closes #1468.

`downloadEmbeddingModel`'s catch regex only matched
`Cannot find package` / `Cannot find module`. On Windows + Node strict
ESM, the bundled `agentic-flow`'s `package.json` doesn't declare a
`./embeddings` subpath, which raises a different shape:

  Package subpath './embeddings' is not defined by "exports" in
  C:\...\node_modules\agentic-flow\package.json

That message didn't match either branch of the existing regex, so the
error re-threw all the way up to `ruflo embeddings init` and broke the
init flow on Windows even though the rest of the embedding pipeline
(@xenova/transformers ONNX) doesn't actually need agentic-flow.

Fix: extend the regex to also catch:
  - `Package subpath '\./embeddings' is not defined`
  - `ERR_PACKAGE_PATH_NOT_EXPORTED`

When matched, falls back to the same lazy-fetch path as the missing-
package case — model downloads on first generate via @xenova.

The other three `import('agentic-flow/embeddings')` sites in this file
(init, isNeuralAvailable, listEmbeddingModels) already wrap their
imports in try/catch that returns a neutral value, so they degrade
gracefully on this same error.

Verified the new regex matches the Windows error string exactly.
WSL/Linux behavior unchanged (those resolve agentic-flow successfully).

Published @claude-flow/embeddings@3.0.0-alpha.16 (alpha + latest tags).
The cli's optional-dep range `^3.0.0-alpha.12` resolves to alpha.16 for
fresh installs, so `npx ruflo@latest embeddings init` picks up the fix
without a cli/umbrella republish.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-05-08 10:06:36 -04:00
..
2026-01-07 04:42:18 +00:00
2026-01-07 04:36:22 +00:00
2026-01-07 05:06:13 +00:00