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

npm install breaks on root #172

Open
decentralgabe opened this issue Feb 25, 2022 · 17 comments
Open

npm install breaks on root #172

decentralgabe opened this issue Feb 25, 2022 · 17 comments

Comments

@decentralgabe
Copy link

decentralgabe commented Feb 25, 2022

steps to repro:

  1. git clone git@github.com:transmute-industries/verifiable-data.git
  2. cd verifiable-data
  3. npm i

this error shows up. have tried 3x, same stuff.

npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build=false
npm ERR! 404 status code downloading tarball https://github.com/mattrglobal/node-bbs-signatures/releases/download/0.11.0/node-v102-darwin-arm64.tar.gz
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using node-pre-gyp@0.14.0
npm ERR! node-pre-gyp info using node@17.4.0 | darwin | arm64
npm ERR! node-pre-gyp WARN Using request for node-pre-gyp https download 
npm ERR! node-pre-gyp info check checked for "/Users/gcohen/Development/verifiable-data/packages/bls12381-key-pair/node_modules/@mattrglobal/node-bbs-signatures/native/index.node" (not found)
npm ERR! node-pre-gyp http GET https://github.com/mattrglobal/node-bbs-signatures/releases/download/0.11.0/node-v102-darwin-arm64.tar.gz
npm ERR! node-pre-gyp http 404 https://github.com/mattrglobal/node-bbs-signatures/releases/download/0.11.0/node-v102-darwin-arm64.tar.gz
npm ERR! node-pre-gyp ERR! install error 
npm ERR! node-pre-gyp ERR! stack Error: 404 status code downloading tarball https://github.com/mattrglobal/node-bbs-signatures/releases/download/0.11.0/node-v102-darwin-arm64.tar.gz
npm ERR! node-pre-gyp ERR! stack     at Request.<anonymous> (/Users/gcohen/Development/verifiable-data/packages/bls12381-key-pair/node_modules/node-pre-gyp/lib/install.js:142:27)
npm ERR! node-pre-gyp ERR! stack     at Request.emit (node:events:532:35)
npm ERR! node-pre-gyp ERR! stack     at Request.onRequestResponse (/Users/gcohen/Development/verifiable-data/packages/bls12381-key-pair/node_modules/request/request.js:1059:10)
npm ERR! node-pre-gyp ERR! stack     at ClientRequest.emit (node:events:520:28)
npm ERR! node-pre-gyp ERR! stack     at HTTPParser.parserOnIncomingClient [as onIncoming] (node:_http_client:618:27)
npm ERR! node-pre-gyp ERR! stack     at HTTPParser.parserOnHeadersComplete (node:_http_common:128:17)
npm ERR! node-pre-gyp ERR! stack     at TLSSocket.socketOnData (node:_http_client:482:22)
npm ERR! node-pre-gyp ERR! stack     at TLSSocket.emit (node:events:520:28)
npm ERR! node-pre-gyp ERR! stack     at addChunk (node:internal/streams/readable:324:12)
npm ERR! node-pre-gyp ERR! stack     at readableAddChunk (node:internal/streams/readable:297:9)
npm ERR! node-pre-gyp ERR! System Darwin 21.3.0
npm ERR! node-pre-gyp ERR! command "/opt/homebrew/Cellar/node/17.4.0/bin/node" "/Users/gcohen/Development/verifiable-data/packages/bls12381-key-pair/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build=false"
npm ERR! node-pre-gyp ERR! cwd /Users/gcohen/Development/verifiable-data/packages/bls12381-key-pair/node_modules/@mattrglobal/node-bbs-signatures
npm ERR! node-pre-gyp ERR! node -v v17.4.0
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.14.0
npm ERR! node-pre-gyp ERR! not ok

Trying to resolve https://github.com/mattrglobal/node-bbs-signatures/releases/download/0.11.0/node-v102-darwin-arm64.tar.gz directly also returns a 404

@OR13
Copy link
Sponsor Member

OR13 commented Feb 25, 2022

hmm, I think we should start by bumping the versions of the mattr lib, and seeing if that resolves the issue.

@OR13
Copy link
Sponsor Member

OR13 commented Feb 25, 2022

I ran npm i without cloning and did not encounter this... I'll keep digging.

@decentralgabe
Copy link
Author

@OR13 I think it may be the specific version node-v102-darwin-arm64.tar.gz since I'm on an ARM Mac. I'm wondering if this just isn't supported by the library.

@OR13
Copy link
Sponsor Member

OR13 commented Feb 25, 2022

ohh....yeah... :(

@OR13
Copy link
Sponsor Member

OR13 commented Feb 25, 2022

I just cloned fresh, and so far, I have not seen this.

@OR13
Copy link
Sponsor Member

OR13 commented Feb 25, 2022

@decentralgabe you mind testing npm i @mattrglobal/node-bbs-signatures by itself? maybe report issue there and cross link.

@OR13
Copy link
Sponsor Member

OR13 commented Feb 25, 2022

also node version, you need to be node14 for this mono repo, due to that library... its the main reason we still have node 14 recommendations at the top of this readme.

@OR13
Copy link
Sponsor Member

OR13 commented Feb 25, 2022

I'm

❯ node -v
v14.15.5
❯ npm -v
6.14.16

npm i from fresh clone worked for me.

@OR13
Copy link
Sponsor Member

OR13 commented Feb 25, 2022

See the warning at the top of our readme: https://github.com/transmute-industries/verifiable-data#node-verion

That said, I think we should probably try to matrix out support for more than just node14... even if we have to nerf some of the wasm based tests related to the mattr lib

@decentralgabe
Copy link
Author

@decentralgabe you mind testing npm i @mattrglobal/node-bbs-signatures by itself? maybe report issue there and cross link.

same error with this command

@decentralgabe
Copy link
Author

decentralgabe commented Feb 25, 2022

also node version, you need to be node14 for this mono repo, due to that library... its the main reason we still have node 14 recommendations at the top of this readme.

ah I'm on node 17.4 and npm 8.3.1, so I'll need to downgrade

@decentralgabe
Copy link
Author

@yhuard
Copy link

yhuard commented Sep 23, 2022

Hi @OR13, related to this issue, do you plan to update mattrglobal/node-bbs-signatures to a more recent version?
v0.11.0 is the last version that doesn't offer binaries for Node.js 16 😢

@OR13
Copy link
Sponsor Member

OR13 commented Sep 23, 2022

@yhuard yeah.... we plan to update that... there is some breaking WASM issue between versions... its in our backlog... if you are brave, I welcome a PR.

@kalinchernev
Copy link
Contributor

Hi @OR13 continuing on the discussion from last week I opened #204 updating the mentioned package.
Checking https://github.com/mattrglobal/node-bbs-signatures/blob/master/CHANGELOG.md there are no expected breaking changes.

The bump would be ok for node 14

$ tsdx test
 PASS  src/Bls12381G2KeyPair.test.ts
 PASS  src/Bls12381G1KeyPair.test.ts
 PASS  src/__tests__/mattr.bls12381.sanity.test.ts
 PASS  src/Bls12381KeyPairs.test.ts
 PASS  src/__tests__/bls12381.sanity.test.ts
 PASS  src/__tests__/noble.bls12381.sanity.test.ts

Test Suites: 6 passed, 6 total
Tests:       18 passed, 18 total

Can confirm that node 16 is not ok though

> tsdx test

 FAIL  src/__tests__/bls12381.sanity.test.ts
  ● Test suite failed to run

    The module '/home/kalin/Projects/ebsi/verifiable-data/packages/bls12381-key-pair/node_modules/@mattrglobal/node-bbs-signatures/native/index.node'
    was compiled against a different Node.js version using
    NODE_MODULE_VERSION 83. This version of Node.js requires
    NODE_MODULE_VERSION 93. Please try re-compiling or re-installing
    the module (for instance, using `npm rebuild` or `npm install`).

      at Runtime._loadModule (node_modules/tsdx/node_modules/jest-runtime/build/index.js:800:29)
      at Object.<anonymous> (node_modules/@mattrglobal/node-bbs-signatures/src/bls12381.ts:22:13)

(node:65691) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at /home/kalin/Projects/ebsi/verifiable-data/packages/bls12381-key-pair/node_modules/tsdx/node_modules/tslib/package.json.
Update this package.json to use a subpath pattern like "./*".
(Use `node --trace-deprecation ...` to show where the warning was created)
(node:65658) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at /home/kalin/Projects/ebsi/verifiable-data/packages/bls12381-key-pair/node_modules/tsdx/node_modules/tslib/package.json.
Update this package.json to use a subpath pattern like "./*".
(Use `node --trace-deprecation ...` to show where the warning was created)
(node:65664) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at /home/kalin/Projects/ebsi/verifiable-data/packages/bls12381-key-pair/node_modules/tsdx/node_modules/tslib/package.json.
Update this package.json to use a subpath pattern like "./*".
(Use `node --trace-deprecation ...` to show where the warning was created)
(node:65678) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at /home/kalin/Projects/ebsi/verifiable-data/packages/bls12381-key-pair/node_modules/tsdx/node_modules/tslib/package.json.
Update this package.json to use a subpath pattern like "./*".
(Use `node --trace-deprecation ...` to show where the warning was created)
 PASS  src/Bls12381G1KeyPair.test.ts
(node:65676) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at /home/kalin/Projects/ebsi/verifiable-data/packages/bls12381-key-pair/node_modules/tsdx/node_modules/tslib/package.json.
Update this package.json to use a subpath pattern like "./*".
(Use `node --trace-deprecation ...` to show where the warning was created)
 FAIL  src/Bls12381G2KeyPair.test.ts
  ● signer / verifier

    RuntimeError: unreachable

      at null.<anonymous> (wasm:/wasm/001aa38a:1:325487)
      at null.<anonymous> (wasm:/wasm/001aa38a:1:362437)
      at null.<anonymous> (wasm:/wasm/001aa38a:1:391964)
      at null.<anonymous> (wasm:/wasm/001aa38a:1:387953)
      at null.<anonymous> (wasm:/wasm/001aa38a:1:391336)
      at null.<anonymous> (wasm:/wasm/001aa38a:1:378712)
      at null.<anonymous> (wasm:/wasm/001aa38a:1:262279)
      at null.<anonymous> (wasm:/wasm/001aa38a:1:387692)
      at null.<anonymous> (wasm:/wasm/001aa38a:1:393899)
      at null.<anonymous> (wasm:/wasm/001aa38a:1:143488)
      at null.<anonymous> (wasm:/wasm/001aa38a:1:197149)
      at null.<anonymous> (wasm:/wasm/001aa38a:1:359883)
      at null.<anonymous> (wasm:/wasm/001aa38a:1:257544)
      at null.<anonymous> (wasm:/wasm/001aa38a:1:352979)
      at null.<anonymous> (wasm:/wasm/001aa38a:1:336913)
      at null.<anonymous> (wasm:/wasm/001aa38a:1:393468)
      at __wbg_adapter_32 (node_modules/@mattrglobal/bbs-signatures/lib/wasm.js:180:10)
      at real (node_modules/@mattrglobal/bbs-signatures/lib/wasm.js:165:20)

 PASS  src/Bls12381KeyPairs.test.ts
(node:65670) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at /home/kalin/Projects/ebsi/verifiable-data/packages/bls12381-key-pair/node_modules/tsdx/node_modules/tslib/package.json.
Update this package.json to use a subpath pattern like "./*".
(Use `node --trace-deprecation ...` to show where the warning was created)
 PASS  src/__tests__/noble.bls12381.sanity.test.ts
 FAIL  src/__tests__/mattr.bls12381.sanity.test.ts (6.283s)
  ● g1: can generate sign and verify

    RuntimeError: unreachable

      at null.<anonymous> (wasm:/wasm/001aa38a:1:325487)
      at null.<anonymous> (wasm:/wasm/001aa38a:1:362437)
      at null.<anonymous> (wasm:/wasm/001aa38a:1:391964)
      at null.<anonymous> (wasm:/wasm/001aa38a:1:387953)
      at null.<anonymous> (wasm:/wasm/001aa38a:1:391336)
      at null.<anonymous> (wasm:/wasm/001aa38a:1:378712)
      at null.<anonymous> (wasm:/wasm/001aa38a:1:262279)
      at null.<anonymous> (wasm:/wasm/001aa38a:1:387692)
      at null.<anonymous> (wasm:/wasm/001aa38a:1:393899)
      at null.<anonymous> (wasm:/wasm/001aa38a:1:216471)
      at null.<anonymous> (wasm:/wasm/001aa38a:1:378395)
      at null.<anonymous> (wasm:/wasm/001aa38a:1:362667)
      at null.<anonymous> (wasm:/wasm/001aa38a:1:268552)
      at null.<anonymous> (wasm:/wasm/001aa38a:1:352979)
      at null.<anonymous> (wasm:/wasm/001aa38a:1:336913)
      at null.<anonymous> (wasm:/wasm/001aa38a:1:393468)
      at __wbg_adapter_32 (node_modules/@mattrglobal/bbs-signatures/lib/wasm.js:180:10)
      at real (node_modules/@mattrglobal/bbs-signatures/lib/wasm.js:165:20)

  ● g2: can generate sign and verify

    : Timeout - Async callback was not invoked within the 5000ms timeout specified by jest.setTimeout.Timeout - Async callback was not invoked within the 5000ms timeout specified by jest.setTimeout.Error:

      24 | });
      25 |
    > 26 | it('g2: can generate sign and verify', async () => {
         | ^
      27 |   const key = await Bls12381G2KeyPair.generate();
      28 |   const signer = key.signer();
      29 |   const signature = await signer.sign({

      at new Spec (node_modules/tsdx/node_modules/jest-jasmine2/build/jasmine/Spec.js:116:22)
      at Object.<anonymous> (src/__tests__/mattr.bls12381.sanity.test.ts:26:1)

Test Suites: 3 failed, 3 passed, 6 total
Tests:       3 failed, 12 passed, 15 total

Although the upgrade is ok for 14, the wasm error for 16 is still present as mentioned.

@OR13
Copy link
Sponsor Member

OR13 commented Sep 26, 2022

I suspect this is caused by "bad data"... and that the test data will need to be updated for the new library version.

@daiky00
Copy link

daiky00 commented Oct 6, 2022

is this resolved?.

I am currently block by this

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

5 participants