denoland / deno

A modern runtime for JavaScript and TypeScript.
https://deno.com
MIT License
96.44k stars 5.33k forks source link

Tagged with @file in npm package dependencies cause error #22083

Open eythaann opened 8 months ago

eythaann commented 8 months ago

similar to #16321 but in this case is using @file

deno --version
deno 1.39.1 (release, x86_64-pc-windows-msvc)
v8 12.0.267.8
typescript 5.3.3

deno cache index.ts
error: Error in readable-types@3.4.0 parsing version requirement for dependency: readable-test-for-types@file:./rtt-plugin

Invalid npm version requirement. Unexpected character.
  file:./rtt-plugin
  ~

Caused by:
    0: Invalid npm version requirement. Unexpected character.
         file:./rtt-plugin
         ~
    1: Unexpected character.
         file:./rtt-plugin
         ~
kt3k commented 8 months ago

document for file: notation in dependencies https://docs.npmjs.com/cli/v10/configuring-npm/package-json#local-paths

avifenesh commented 5 months ago

Same issue:

deno install npm:@aws/glide-for-redis
⚠️ `deno install` behavior will change in Deno 2. To preserve the current behavior use the `-g` or `--global` flag.
error: Error in @aws/glide-for-redis-darwin-arm64@0.3.3 parsing version requirement for dependency: glide-rs@file:rust-client

Invalid npm version requirement. Unexpected character.
  file:rust-client
  ~

Caused by:
    0: Invalid npm version requirement. Unexpected character.
         file:rust-client
         ~
    1: Unexpected character.
         file:rust-client
         ~

Any updates on this?