Netflix / unleash

Professionally publish your JavaScript modules in one keystroke
http://netflix.github.io/unleash/
Apache License 2.0
594 stars 26 forks source link

Better error handling #15

Open portokallidis opened 6 years ago

portokallidis commented 6 years ago

Congratulations for this awesome module because its working pretty good and its painless. I 've just had an issue in one of my apps but i cant get any error description. Is there any --debug option? Probably if you use JSON.stringify to capture this ([object Object])?

[12:26:40] === UNLEASH ===
[12:26:40] Utilizing next version for changelog:  1.0.6
[12:26:40] Using repo type:  github
events.js:165
      throw err;
      ^

Error: Uncaught, unspecified "error" event. ([object Object])
    at Undertaker.emit (events.js:163:17)
    at Object.error (/home/nporto/npm/lib/node_modules/unleash/node_modules/undertaker/lib/helpers/createExtensions.js:61:10)
    at handler (/home/nporto/npm/lib/node_modules/unleash/node_modules/now-and-later/lib/mapSeries.js:43:14)
    at f (/home/nporto/npm/lib/node_modules/unleash/node_modules/once/once.js:25:25)
    at f (/home/nporto/npm/lib/node_modules/unleash/node_modules/once/once.js:25:25)
    at done (/home/nporto/npm/lib/node_modules/unleash/node_modules/async-done/index.js:24:15)
    at _combinedTickCallback (internal/process/next_tick.js:71:11)
    at Immediate._tickDomainCallback (internal/process/next_tick.js:122:9)
    at runCallback (timers.js:649:20)
    at tryOnImmediate (timers.js:622:5)
portokallidis commented 6 years ago

SOLVED:

I run npm init to validate the package.json and now works fine, probably added some fields that i may had forgotten, although npm install was working fine.

Anyway this issue is just a reminder to be verbose on errors with adding a --debug mode or something

jameswomack commented 6 years ago

@portokallidis I've seen a similar unintelligible error message before but wasn't able to track down the source. If you provide a reproducible use case that produces that error I'd be happy to take a look at solving it 👍

jameswomack commented 6 years ago

(note to self: https://github.com/gulpjs/gulp/blob/de1acf66a6253302c856971f8c00f65ea6c63882/docs/recipes/combining-streams-to-handle-errors.md)