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

bug: console.table doesn't print #24909

Closed
maddhruv opened this issue Dec 8, 2018 · 8 comments
Closed

bug: console.table doesn't print #24909

maddhruv opened this issue Dec 8, 2018 · 8 comments
Labels
console Issues and PRs related to the console subsystem.

Comments

@maddhruv
Copy link

maddhruv commented Dec 8, 2018

  • Version: 8.12.0
  • Platform: Linux bigbang 4.15.0-42-generic 45-Ubuntu SMP Thu Nov 15 19:32:57 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
  • Subsystem: Console

image

@addaleax addaleax added the console Issues and PRs related to the console subsystem. label Dec 8, 2018
@antsmartian
Copy link
Contributor

Just tried on 9.11.2 - doesn't work. But on 10.0.0 its working.

@addaleax
Copy link
Member

addaleax commented Dec 8, 2018

The functionality was only added in 10.0.0, see https://nodejs.org/api/console.html#console_console_table_tabulardata_properties

@devsnek
Copy link
Member

devsnek commented Dec 8, 2018

this is not a bug. console.table was a no-op until v10 (and was also backported to v9)

note that in the versions before it was implemented in node, it will still print out the console table in the chrome devtools inspector.

@devsnek devsnek added the v8.x label Dec 8, 2018
@maddhruv
Copy link
Author

maddhruv commented Dec 8, 2018

if it wasn't introduced until v10
why doesn't it throw an Error
TypeError: console.table is not a function
?

@devsnek
Copy link
Member

devsnek commented Dec 8, 2018

@maddhruv V8 engine has its own console which outputs to the inspector console, which is what was directly exposed. (see https://nodejs.org/api/console.html#console_inspector_only_methods)

@Trott
Copy link
Member

Trott commented Dec 8, 2018

This is an 8.x documentation bug IMO. It ought to be listed in the 8.x docs but it is not. It's in the 9.x docs and even says that it was added in 8.0.0 there: https://nodejs.org/docs/latest-v9.x/api/console.html#console_console_table_array_columns

@Trott
Copy link
Member

Trott commented Dec 8, 2018

The docs were added in #17004 but that PR got a dont-land-on-v8.x label for some reason.

I've removed the label and hopefully that means it ends up in the next v8.x release. See #17004 (comment)

@Trott
Copy link
Member

Trott commented Dec 8, 2018

Given the above, I'm going to close this, but if you think it should remain open until the next 8.x release, leave a comment or (if GitHub lets you) re-open.

@Trott Trott closed this as completed Dec 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
console Issues and PRs related to the console subsystem.
Projects
None yet
Development

No branches or pull requests

5 participants