You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The program is installed correctly and I can use cli.ts as a globally installed CLI.
Actual Result
error: cli.ts is missing a prefix. Did you mean `deno install -g npm:cli.ts`?
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.
The text was updated successfully, but these errors were encountered:
dsherret
changed the title
bug: deno install -g fails to install local files if they are not prefixed with ./
bug: deno install -g fails to install local files if they are not prefixed with ./ if npm or jsr pkg exists with same name
Nov 21, 2024
#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.
The text was updated successfully, but these errors were encountered: