Skip to content

node examples/revs.js gives errors #148

@msabramo

Description

@msabramo
[abramowi@Marcs-MacBook-Pro-2 cli-table]$ node examples/revs.js
┌──────┬─────────────────────┬─────────────────────────┬─────────────────┐
│ Rel  │ Change              │ By                      │ When            │
├──────┼─────────────────────┼─────────────────────────┼─────────────────┤
│ v0.1 │ Testing something … │ rauchg@gmail.com        │ 7 minutes ago   │
├──────┼─────────────────────┼─────────────────────────┼─────────────────┤
│ v0.1 │ Testing something … │ rauchg@gmail.com        │ 8 minutes ago   │
└──────┴─────────────────────┴─────────────────────────┴─────────────────┘
┌──────┬─────────────────────┬─────────────────────────┬─────────────────┐
│ Rel  │ Change              │ By                      │ When            │
├──────┼─────────────────────┼─────────────────────────┼─────────────────┤
│ v0.1 │ Testing something … │ rauchg@gmail.com        │ 7 minutes ago   │
│ v0.1 │ Testing something … │ rauchg@gmail.com        │ 8 minutes ago   │
├──────┼─────────────────────┼─────────────────────────┼─────────────────┤
│ v0.1 │ Testing something … │ rauchg@gmail.com        │ 8 minutes ago   │
└──────┴─────────────────────┴─────────────────────────┴─────────────────┘
/Users/abramowi/dev/git-repos/cli-table/lib/index.js:51
  if (options.rows) {
              ^

TypeError: Cannot read property 'rows' of undefined
    at new Table (/Users/abramowi/dev/git-repos/cli-table/lib/index.js:51:15)
    at Object.<anonymous> (/Users/abramowi/dev/git-repos/cli-table/examples/revs.js:43:22)
    at Module._compile (internal/modules/cjs/loader.js:1072:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
    at Module.load (internal/modules/cjs/loader.js:937:32)
    at Function.Module._load (internal/modules/cjs/loader.js:778:12)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
    at internal/main/run_main_module.js:17:47

It looks lie maybe the headless tables aren't working? Because if I comment out the headless_table and vertical_table stuff, then the code runs without errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions