Commit 8e79a6b
committed
fix(types): a location install's refusal states the LIMIT, not a false install remedy
`createHostImporter`'s ESM-only fallback finder refuses a `link:` / `file:`
install whose linked manifest names something other than the declaration key —
correctly, and deliberately, since a location specifier carries no package name
to expect and accepting the directory anyway would trade a wrong REMEDY for a
wrong LOAD. It reported that refusal with the `declared-unresolvable` INSTALL
wording, every remedy of which is measurably false for this shape: the finder
had just read the manifest at `node_modules/<key>`, so the package is on disk,
was not pruned, and its `import` target exists.
The refusal is unchanged — same kind, same `MODULE_NOT_FOUND`, same exit path,
same accept set. Only the words change: the message now states the directory it
consulted, the name found there, the name expected, why a location specifier
leaves it only the key, and the remedy that works (make the two names agree,
from either end — both pinned as loading).
The second verification axis the card also proposes — comparing
`realpath(node_modules/<key>)` against the declared location, which would make
these installs LOAD — is deliberately not built here.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015QE8qk46e5CHJxyQEUjbf81 parent 2a90bb2 commit 8e79a6b
1 file changed
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
0 commit comments