bchr02 / node-pre-gyp-github

A node-pre-gyp module which provides the ability to publish to GitHub releases.
MIT License
52 stars 32 forks source link

1.4.1 fails with UnhandledPromiseRejectionWarning: HttpError: Not Found, but 1.3.1 works #24

Closed kevinmehall closed 6 years ago

kevinmehall commented 6 years ago

node-usb uses node-pre-gyp-github, and something seems to have broken with the latest release:

(node:6394) UnhandledPromiseRejectionWarning: HttpError: Not Found
    at response.text.then.message (/Users/travis/.nvm/versions/node/v10.9.0/lib/node_modules/node-pre-gyp-github/node_modules/@octokit/rest/lib/request/request.js:72:19)
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:6394) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:6394) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

It failed on Travis and on AppVeyor, but after pinning the version back to 1.3.1, it successfully published.

rolftimmermans commented 6 years ago

Also running into this. It seems to be caused by https://github.com/bchr02/node-pre-gyp-github/commit/52e9af0950c72581cc75838185aed630e66af1ee.

A request is made to: https://github.com/api/v3/repos/<user>/<repo>/releases

This endpoint does not exist.

The correct endpoint according to the GitHub API is: https://api.github.com/repos/<user>/<repo>/releases

bchr02 commented 6 years ago

Okay, I’ll go ahead and fix this. Thank you!

bchr02 commented 6 years ago

Closed by https://github.com/bchr02/node-pre-gyp-github/pull/28. Thanks @Nawaid95