pact-foundation / pact-js

JS version of Pact. Pact is a contract testing framework for HTTP APIs and non-HTTP asynchronous messaging systems.
https://pact.io
Other
1.61k stars 344 forks source link

Cannot install #886

Closed chuasonglin1995 closed 2 years ago

chuasonglin1995 commented 2 years ago

Software versions

Windows 11 Npm: v16

Expected behaviour

Should install properly

Actual behaviour

Error: Error while installing binary: Postinstalled Failed Unexpectedly: Error: Error while installing binary: Checksum file missing from standalone directory. Aborting.

Steps to reproduce

npm install @pact-foundation/pact@latest

Relevant log files

npm WARN deprecated libnpmconfig@1.2.1: This module is not used anymore. npm config is parsed by npm itself and by @npmcli/config

es5-ext@0.10.61 postinstall C:\SongLin\Xendit\Code\nex-api\node_modules\es5-ext node -e "try{require('./_postinstall')}catch(e){}" || exit 0

@pact-foundation/pact-node@10.17.5 postinstall C:\SongLin\Xendit\Code\nex-api\node_modules\@pact-foundation\pact-node node postinstall.js

Installing Pact Standalone Binary for win32. Downloading Pact Standalone Binary v1.89.02-rc1 for platform win32 from https://github.com/pact-foundation/pact-ruby-standalone/releases/download/v1.89.02-rc1/pact-1.89.02-rc1-win32.zip Please note: we are tracking this download anonymously to gather important usage statistics. To disable tracking, set 'pact_do_not_track: true' in your package.json 'config' section. Downloaded 0.01%... Finished downloading binary to C:\SongLin\Xendit\Code\nex-api\node_modules\@pact-foundation\pact-node\standalone\pact-1.89.02-rc1-win32.zip Error: Error while installing binary: Postinstalled Failed Unexpectedly: Error: Error while installing binary: Checksum file missing from standalone directory. Aborting. at throwError (C:\SongLin\Xendit\Code\nex-api\node_modules\@pact-foundation\pact-node\standalone\install.js:42:11) at C:\SongLin\Xendit\Code\nex-api\node_modules\@pact-foundation\pact-node\standalone\install.js:327:16 at processTicksAndRejections (internal/process/task_queues.js:93:5) npm WARN @firebase/database-compat@0.1.5 requires a peer of @firebase/app-compat@0.x but none is installed. You must install peer dependencies yourself.

YOU54F commented 2 years ago

Hi

yes there appears to be an issue that was identified by one of our users on slack

https://pact-foundation.slack.com/archives/C9VBGLUM9/p1657091994670579

Looks like

Release 9.17.3 brings in an update to upgrade to latest pact-node (0d9b127)

https://github.com/pact-foundation/pact-js/commit/0d9b1270d4dc03e761941ae060b2a75db0bab24d#diff-7ae45ad102eab3b6d7e789[ā€¦]6470d7bc6507b6481575d519R97

pact-js-core released https://github.com/pact-foundation/pact-js-core/releases/tag/v13.6.2 which is on npm as

so will be picked up by the caret in the pact-node dep in pact-js.

Looking at the changes in https://github.com/pact-foundation/pact-ruby-standalone/commits/master

the latest release brought in an addition of some azure env vars from this issue

https://github.com/pact-foundation/pact_broker-client/commit/889f83f3d24dfa4db2824a0049e11ec97a391ab2

Not sure what the root cause is at the moment but will look into it as soon as possible

mefellows commented 2 years ago

Looking into this now. Looks like an error with the pact-node release......

mefellows commented 2 years ago

OK have pushed out a new version. My suspicion is the checksum pushed out was incorrect/missing, apologies for the issue.

The latest version seems to install correctly, on my M1 at least. I'll check a few others now if possible also.

āžœ  foo npm i @pact-foundation/pact-node@v10.17.6                                                                                                                                                             <aws:pactflow-dev-admin>
npm WARN deprecated libnpmconfig@1.2.1: This module is not used anymore. npm config is parsed by npm itself and by @npmcli/config

> @pact-foundation/pact-node@10.17.6 postinstall /private/tmp/foo/node_modules/@pact-foundation/pact-node
> node postinstall.js

Installing Pact Standalone Binary for darwin.
Downloading Pact Standalone Binary v1.89.02-rc1 for platform darwin from https://github.com/pact-foundation/pact-ruby-standalone/releases/download/v1.89.02-rc1/pact-1.89.02-rc1-osx.tar.gz
Please note: we are tracking this download anonymously to gather important usage statistics. To disable tracking, set 'pact_do_not_track: true' in your package.json 'config' section.
Downloaded 0.56%...
Downloaded 52.40%...
Finished downloading binary to /private/tmp/foo/node_modules/@pact-foundation/pact-node/standalone/pact-1.89.02-rc1-osx.tar.gz
Extracting binary from /private/tmp/foo/node_modules/@pact-foundation/pact-node/standalone/pact-1.89.02-rc1-osx.tar.gz.
Checksum passed for 'pact-1.89.02-rc1-osx.tar.gz'.
Extraction done.

### If you ā¤ Pact and want to support us, please donate here: http://donate.pact.io/node

Pact Standalone Binary is ready.
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN foo@1.0.0 No description
npm WARN foo@1.0.0 No repository field.

+ @pact-foundation/pact-node@10.17.6
added 133 packages from 150 contributors and audited 133 packages in 14.811s

6 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
YOU54F commented 2 years ago

Thanks @mefellows šŸ’›