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

Installs but only usage help working #1

Open
morsedl opened this issue Dec 5, 2016 · 1 comment
Open

Installs but only usage help working #1

morsedl opened this issue Dec 5, 2016 · 1 comment

Comments

@morsedl
Copy link

morsedl commented Dec 5, 2016

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
[email protected] /usr/local/lib/node_modules/german
├── [email protected]
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected])
└── [email protected] ([email protected], [email protected])
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

@nicksellen
Copy link
Owner

Sorry for the 3 year delay in responding, but I just published a new version, if it still has the issue and you're still interested let me know!

By the way it's written in nodejs (not ruby), so node --version is the way to tell the version of that. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants