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

Handling situation where a module was not found #16

Open
p0358 opened this issue Aug 15, 2017 · 2 comments
Open

Handling situation where a module was not found #16

p0358 opened this issue Aug 15, 2017 · 2 comments

Comments

@p0358
Copy link
Member

p0358 commented Aug 15, 2017

If you enter invalid module name which doesn't exist in KPM table for example, instead of displaying some nice message, it throws this:

error: "kpm" wywalił się. <unknown> jest teraz pokryty chorobą.
2017-08-15T13:42:46.291Z - debug: Error: No type exists to perform that operation.
    at /var/www/Concierge/modules/kpm/src/types.js:21:15
    at undefined.throw (native)
    at step (/var/www/Concierge/modules/kpm/src/types.js:1:260)
    at /var/www/Concierge/modules/kpm/src/types.js:1:459
    at process._tickCallback (internal/process/next_tick.js:109:7)

Might want to change that a little, at least for non-debug mode, when it displays just error: "kpm" threw up. <unknown> is now covered in sick., without debug: Error: No type exists to perform that operation..

@p0358
Copy link
Member Author

p0358 commented Aug 15, 2017

And now I thought it might also correct typos by suggesting module names if user typed something very similiar to one of the available modules' names from KPM table.

@drkno
Copy link
Member

drkno commented Aug 16, 2017

Technically the error message is correct. It does the following:

  1. Search the kpm table
  2. See if we can use it as a url
  3. Search npm for a package of the same name

Each of these operations are a "type" ("git", "url", "npm").

I agree that the error message could be more user friendly and less cryptic though. Suggesting alternatives is something I was hoping to integrate into help some day. Help would suggest what you could have typed and correct it. There are a multitude of issues there (the no-americano module is a self created problem in this respect).

If you have time, both of these enhancements are relatively simple to achieve (I just don't have time to do them myself right now).

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