mjrlowe / terminal_images

A Deno module and CLI tool for printing images to the console. 🖼️
MIT License
51 stars 3 forks source link

Install error: TS2345 [ERROR]: Argument of type 'Uint8Array #2

Closed David-Else closed 3 years ago

David-Else commented 3 years ago
deno --version
deno 1.5.4 (bc79d55, release, x86_64-unknown-linux-gnu)
v8 8.8.278.2
typescript 4.0.5
deno install --allow-read --allow-net --unstable --force https://x.nest.land/terminal_images@2.1.0/cli.ts
Download https://x.nest.land/terminal_images@2.1.0/cli.ts
Download https://arweave.net/WwDATPpA6B1kOcJvNUhpzqKnu1FLb5EtoqjEXFWosBI/cli.ts
Download https://lmamath2idub2zbzyjxtksdjz2rkpo2rjnxzclncvdcfyvniwaja.arweave.net/WwDATPpA6B1kOcJvNUhpzqKnu1FLb5EtoqjEXFWosBI/cli.ts
Download https://lmamath2idub2zbzyjxtksdjz2rkpo2rjnxzclncvdcfyvniwaja.arweave.net/WwDATPpA6B1kOcJvNUhpzqKnu1FLb5EtoqjEXFWosBI/mod.ts
Download https://lmamath2idub2zbzyjxtksdjz2rkpo2rjnxzclncvdcfyvniwaja.arweave.net/WwDATPpA6B1kOcJvNUhpzqKnu1FLb5EtoqjEXFWosBI/version.ts
Download https://lmamath2idub2zbzyjxtksdjz2rkpo2rjnxzclncvdcfyvniwaja.arweave.net/WwDATPpA6B1kOcJvNUhpzqKnu1FLb5EtoqjEXFWosBI/deps.ts
Download https://deno.land/x/jpegts@1.1/mod.ts
Download https://deno.land/x/gutenberg@0.1.5/unicode/width/mod.ts
Download https://cdn.skypack.dev/upng-js@v2.1.0
Download https://deno.land/std@0.77.0/flags/mod.ts
Download https://deno.land/std@0.77.0/fmt/colors.ts
Download https://deno.land/x/jpegts@1.1/lib/encoder.ts
Download https://deno.land/x/jpegts@1.1/lib/image.ts
Download https://deno.land/x/jpegts@1.1/lib/decoder.ts
Download https://deno.land/x/jpegts@1.1/lib/pixel.ts
Download https://deno.land/x/gutenberg@0.1.5/unicode/is_fullwidth/mod.ts
Download https://deno.land/x/gutenberg@0.1.5/unicode/emoji_regex/mod.ts
Download https://deno.land/x/gutenberg@0.1.5/ansi/strip/mod.ts
Download https://deno.land/x/gutenberg@0.1.5/ansi/regex/mod.ts
Download https://deno.land/std@0.77.0/_util/assert.ts
Download https://cdn.skypack.dev/-/upng-js@v2.1.0-VLn77RM5LLaxBHlzxA7B/dist=es2020/upng-js.js
Download https://cdn.skypack.dev/-/pako@v1.0.11-AzEOuLZH2cHjQ9fU2szy/dist=es2020/pako.js
Check https://x.nest.land/terminal_images@2.1.0/cli.ts
error: TS2345 [ERROR]: Argument of type 'Uint8Array | { data: Uint8Array; width: number; height: number; }' is not assignable to parameter of type 'Uint8Array'.
  Type '{ data: Uint8Array; width: number; height: number; }' is missing the following properties from type 'Uint8Array': BYTES_PER_ELEMENT, buffer, byteLength, byteOffset, and 26 more.
    : getFileType(raw);
                  ~~~
    at https://lmamath2idub2zbzyjxtksdjz2rkpo2rjnxzclncvdcfyvniwaja.arweave.net/WwDATPpA6B1kOcJvNUhpzqKnu1FLb5EtoqjEXFWosBI/mod.ts:61:19
deno run --allow-net=deno.land --unstable https://x.nest.land/terminal_images@2.0.0/cli.ts --file="https://deno.land/images/deno_city.jpeg" --color

Works :)
mjrlowe commented 3 years ago

Hmm... Thanks for reporting. Use version 2.0.0 for now and I'll let you know when this is fixed.

mjrlowe commented 3 years ago

Fixed in version 2.1.2