Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm:cli-table push() is not a function #24986

Open
littledivy opened this issue Aug 11, 2024 · 2 comments
Open

npm:cli-table push() is not a function #24986

littledivy opened this issue Aug 11, 2024 · 2 comments
Labels
bug Something isn't working correctly node compat

Comments

@littledivy
Copy link
Member

littledivy commented Aug 11, 2024

Repro:

import Table from "npm:cli-table";
const table = new Table();
console.log(table.push(["foo", "bar"]));
error: Uncaught (in promise) TypeError: table.push is not a function
console.log(table.push(["foo", "bar"]));
                  ^
    at file:///home/divy/gh/deno/repro.mjs:4:19

Ref #24408

@littledivy littledivy added bug Something isn't working correctly node compat labels Aug 11, 2024
@littledivy
Copy link
Member Author

https://github.com/Automattic/cli-table/blob/6593d2e96f20c10618b6f5d30d5f37e60711a8aa/lib/index.js#L62

It sets __proto__ to Array.prototype. Works with deno --unstable-unsafe-proto

@lucacasonato
Copy link
Member

Automattic/cli-table#179

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly node compat
Projects
None yet
Development

No branches or pull requests

2 participants