maci icon indicating copy to clipboard operation
maci copied to clipboard

npm package maci-crypto latest version (v1.0.4) failed to install

Open yuetloo opened this issue 3 years ago • 5 comments

Got the following error when installing the latest version of maci-crypto. Version v0.9.1 works fine, which is the version of the master branch. The error looks like coming from this line of the v1 branch.

error Command failed.
Exit code: 128
Command: git
Arguments: ls-remote --tags --heads git://github.com/weijiekoh/circomlib.git
Directory: /Users/yuetloo/projects/clrfund/my-key
Output:
fatal: unable to connect to github.com:
github.com[0: 140.82.113.4]: errno=Operation timed out

yuetloo avatar Jul 06 '22 16:07 yuetloo

Hmm, I still have access to this repo but some of these circuits are not being actively maintained and should be moved instead of relying on another remote repo.

corydickson avatar Jul 07 '22 04:07 corydickson

@yuetloo How can I reproduce it? If you failed during run lerna command, it could be suppressed by installing circomlib manually. Following is the example commands:

          git init circuits/node_modules/circomlib
          cd circuits/node_modules/circomlib
          git remote add origin https://github.com/weijiekoh/circomlib
          git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin ac85e82c1914d47789e2032fb11ceb2cfdd38a2b
          git checkout --progress --force ac85e82c1914d47789e2032fb11ceb2cfdd38a2b
          rm -rf ./.git

baumstern avatar Jul 18 '22 14:07 baumstern

@gurrpi , I have a sample next-app that demonstrates how to use the maci library to generate the maci key here as someone was asking how to use the library. It has a dependency on the maci-crypto. When I do yarn add maci-crypto in my project, it gave the error accessing weijiekoh repository. When I do yarn add [email protected], the install works and that's the version clrfund uses.

So, i think the solution is to remove/replace the reference to the weijiekoh's circomlib in the npm package that was published for v1.0.

yuetloo avatar Jul 18 '22 16:07 yuetloo

@gurrpi , I have a sample next-app that demonstrates how to use the maci library to generate the maci key here as someone was asking how to use the library. It has a dependency on the maci-crypto. When I do yarn add maci-crypto in my project, it gave the error accessing weijiekoh repository. When I do yarn add [email protected], the install works and that's the version clrfund uses.

So, i think the solution is to remove/replace the reference to the weijiekoh's circomlib in the npm package that was published for v1.0.

I think replacing to https access to GitHub instead of git would fix an importing problem. I filed an issue to replace it: https://github.com/privacy-scaling-explorations/maci/issues/472

BTW, its super cool to have such a demonstration 💚

baumstern avatar Jul 20 '22 10:07 baumstern

As a temporary workaround, i run the following command to replace git with https in my local directory:

git config --global url."https://".insteadOf git://
yarn add maci-crypto

yuetloo avatar Nov 04 '22 00:11 yuetloo