Closed KnorpelSenf closed 21 hours ago
This occurs because https://www.npmjs.com/package/cli.ts exists
Are you saying that the Deno CLI first contacts the npm registry before even checking for the file on disk? 🫠
Yes, it's a regression that I didn't catch in code review.
I'm already rolling a change to fix this.
@mbrdg there's a fix https://github.com/denoland/deno/pull/26975
Thanks for the super fast turnaround time!
https://github.com/denoland/deno/pull/26629 caused a regression in 2.1.0 that prevents
deno install -g
from handling local files correctly.Repro
Expected Result
The program is installed correctly and I can use
cli.ts
as a globally installed CLI.Actual Result
With Deno 2.0.6, everything works as expected. However, since Deno 2.1.0, the above error is thrown.
Ideally, I would like the previous functionality to keep on working. Bare filenames are supported everywhere else and it is just bad DX not to do it here.
On the other hand, if you want to enfore a prefix even for local files for some reason, then this still has to be fixed. The error is nonsense. It should not suggest an import from npm but rather suggest me to prefix the path with
./
.But I believe that the whole point of prefixing jsr/npm imports was to be able to support local files cleanly, so I assume that the behaviour from 2.0.6 can just be restored.