Skip to content

Installs but only usage help working #1

Description

@morsedl

Hi Nick!

Your "german" node.js program looks promising! However, I cannot seem to get it running (Ubuntu 15.10, 64-bit). It installs and prints out the command-line usage help just fine:

root@n1:~# npm install german --global
/usr/local/bin/german -> /usr/local/lib/node_modules/german/bin/german.js
german@0.0.10 /usr/local/lib/node_modules/german
├── colors@1.1.2
├── commander@2.9.0 (graceful-readlink@1.0.1)
├── js-yaml@3.7.0 (esprima@2.7.3, argparse@1.0.9)
└── columnify@1.5.4 (strip-ansi@3.0.1, wcwidth@1.0.1)
root@n1:~# which german
/usr/local/bin/german
root@n1:~# german

  Usage: german [options] [command]


  Commands:

    list        list the verbs I know about
    conjugate   conjugate a verb
    quiz        take a quiz!
    foo         foo!
    foo2        foo2!
    help [cmd]  display help for [cmd]

  Options:

    -h, --help  output usage information

However, anything beyond that seems to generate an error:

For example:

root@n1:~# german list

/usr/local/lib/node_modules/german/lib/verbs.js:85
    if (Object.keys(verb[key]).length === 0) {
               ^
TypeError: Object.keys called on non-object
    at Function.keys (native)
    at /usr/local/lib/node_modules/german/lib/verbs.js:85:16
    at Array.forEach (native)
    at calculateIrregularity (/usr/local/lib/node_modules/german/lib/verbs.js:83:31)
    at setVerbDefaults (/usr/local/lib/node_modules/german/lib/verbs.js:60:23)
    at /usr/local/lib/node_modules/german/lib/verbs.js:159:5
    at Array.map (native)
    at load (/usr/local/lib/node_modules/german/lib/verbs.js:137:50)
    at Object.<anonymous> (/usr/local/lib/node_modules/german/lib/verbs.js:27:1)
    at Module._compile (module.js:456:26)
root@n1:~#

or

root@n1:~# german conjugate haben

/usr/local/lib/node_modules/german/lib/verbs.js:85
    if (Object.keys(verb[key]).length === 0) {
               ^
TypeError: Object.keys called on non-object
    at Function.keys (native)
    at /usr/local/lib/node_modules/german/lib/verbs.js:85:16
    at Array.forEach (native)
    at calculateIrregularity (/usr/local/lib/node_modules/german/lib/verbs.js:83:31)
    at setVerbDefaults (/usr/local/lib/node_modules/german/lib/verbs.js:60:23)
    at /usr/local/lib/node_modules/german/lib/verbs.js:159:5
    at Array.map (native)
    at load (/usr/local/lib/node_modules/german/lib/verbs.js:137:50)
    at Object.<anonymous> (/usr/local/lib/node_modules/german/lib/verbs.js:27:1)
    at Module._compile (module.js:456:26)
root@n1:~# 

As you can see, in each of these examples the error is "TypeError: Object.keys called on non-object".

Perhaps it's the version of Ruby with Ubuntu 15.10 that is the problem, as it pre-dates your package? I would not think so, given the rather simple meaning of the error messages, but one never knows. Running "ruby --version" on this system reports "ruby 2.1.5p273 (2014-11-13) [x86_64-linux-gnu]".

Thanks in advance for any insights or assistance.

Cheers!
Doug

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions