Skip to content

core: fix npm package detection to properly handle cached directories without installed packages#25354

Merged
rekram1-node merged 1 commit into
devfrom
fix-reify-issue
May 1, 2026
Merged

core: fix npm package detection to properly handle cached directories without installed packages#25354
rekram1-node merged 1 commit into
devfrom
fix-reify-issue

Conversation

@rekram1-node
Copy link
Copy Markdown
Collaborator

closes: #24431

@rekram1-node
Copy link
Copy Markdown
Collaborator Author

/review

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2026

lgtm

@rekram1-node rekram1-node merged commit 4781564 into dev May 1, 2026
16 of 17 checks passed
@rekram1-node rekram1-node deleted the fix-reify-issue branch May 1, 2026 20:49
oleksii-honchar pushed a commit to oleksii-honchar/better-opencode that referenced this pull request May 6, 2026
legion-implementer Bot pushed a commit to sjawhar/opencode that referenced this pull request May 10, 2026
…ry specs

For non-registry specs (remote tarball URLs, git+https://, github: shorthand,
file: paths), npa(pkg).name returns undefined - only registry packages have
inferable names from the spec alone. Read the install-root package.json
written by Arborist on the initial install to recover the actual installed
package name from its first dependency entry.

When the cache directory exists but is empty (no package.json), fall through
to the Arborist install path instead of returning a likely-failing entrypoint
resolution. This preserves upstream's anomalyco#25354 fix for empty cache dirs while
adding the cached-name resolution for non-registry specs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

loadOptions(dir) in Npm.add reify path fails on CI runners → silent ProviderInitError for dynamic providers

1 participant