yao-pkg / pkg

Package your Node.js project into an executable
https://www.npmjs.com/package/@yao-pkg/pkg
MIT License
396 stars 20 forks source link

5.16.0: "Binary hash does NOT match" for node20-win-x64 #107

Closed willjouo closed 1 month ago

willjouo commented 1 month ago

What version of pkg are you using?

5.16.0

What version of Node.js are you using?

20.18.0

What operating system are you using?

Windows

What CPU architecture are you using?

x64

What Node versions, OSs and CPU architectures are you building for?

node20-win-x64

Describe the Bug

Hello,

I just updated pkg from 5.15.0 to 5.16.0 and there is an error when downloading the new 20.18.0 node version. Everything was working fine with 5.15.0. I didn't change my building script with is still for node20-windows.

> Fetching base Node.js binaries to PKG_CACHE_PATH
  fetched-v20.18.0-win-x64            [====================] 100%

> Error! Binary hash does NOT match.
\node_modules\@yao-pkg\pkg-fetch\lib-es5\log.js:100
        var _this = _super !== null && _super.apply(this, arguments) || this;
                                              ^

Error [ReportedError]: Binary hash does NOT match.
    at new ReportedError (\node_modules\@yao-pkg\pkg-fetch\lib-es5\log.js:100:47)
    at wasReported (\node_modules\@yao-pkg\pkg-fetch\lib-es5\log.js:111:25)
    at \node_modules\@yao-pkg\pkg-fetch\lib-es5\index.js:228:49
    at step (\node_modules\@yao-pkg\pkg-fetch\lib-es5\index.js:56:23)
    at Object.next (\node_modules\@yao-pkg\pkg-fetch\lib-es5\index.js:37:53)
    at fulfilled (\node_modules\@yao-pkg\pkg-fetch\lib-es5\index.js:28:58)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  wasReported: true
}

Thank you in advance!

Expected Behavior

It should work.

To Reproduce

I guess just trying to build with target node20-windows on Windows should reproduce the bug.

faulpeltz commented 1 month ago

I can reproduce this - looks like the lib/expected-shas.json is missing all but one shasums for the new version @robertsLando

un0tec commented 1 month ago

Same issue, I had to revert to the previous version

robertsLando commented 1 month ago

Sorry guys, seems my automated workflow to update shas isn't working as expected. Fixing it now ๐Ÿ™๐Ÿผ

robertsLando commented 1 month ago

5.16.1 is out now ๐Ÿš€

willjouo commented 1 month ago

Thank you! It's working ๐Ÿ‘

robertsLando commented 1 month ago

Thanks for the feedback @willjouo ๐Ÿ™๐Ÿผ