Im-Beast / deno_tui

🦕 Deno module for creating Terminal User Interfaces
https://deno.land/x/tui
MIT License
266 stars 18 forks source link

bug: error: Uncaught TypeError: Deno.consoleSize is not a function #10

Closed Daiki48 closed 2 years ago

Daiki48 commented 2 years ago

Bug description A clear and concise description of what the bug is.

Get started in README.md. Thank you for your kind explanation. However, I got the error in the title.

The same error occurs with the contents of README.md or with demo.ts in the example directory.

Execute the following command under the deno_tui directory.

$ deno run --allow-run ./examples/demo.ts

Error Description.

error: Uncaught TypeError: Deno.consoleSize is not a function
    this.size = Deno.consoleSize(this.stdout.rid);
                     ^
    at new Canvas (file:///Users/{username}/Documents/projects/deno/deno_tui/src/canvas.ts:51:22)
    at file:///Users/{username}/Documents/projects/deno/deno_tui/examples/demo.ts:32:11

Expected behavior What you expected to happen instead.

No errors.

Information (please complete)

It may not be a bug, but my mistake. If I am wrong, please advise.

deno 1.24.3 (release, aarch64-apple-darwin)
v8 10.4.132.20
typescript 4.7.4
Im-Beast commented 2 years ago

Screenshot_2022-08-22-15-58-53-85_320a9a695de7cdce83ed5281148d6f19.jpg

Im-Beast commented 2 years ago

Also duplicate of #6