semaphore-protocol / semaphore

A zero-knowledge protocol for anonymous interactions.
https://semaphore.pse.dev
MIT License
911 stars 201 forks source link

Asking about compile errors #60

Closed adust09 closed 3 years ago

adust09 commented 3 years ago

I'm trying to develop an application using semaphore.

Compilation was successful, the compiled directory was created, and the ABI was created. However, I got an error message like this

% npm run compileSol          

> semaphore-contracts@0.0.1 compileSol /Users/username/semaphore-card/semaphore/contracts
> ./scripts/compileSol.sh

Building contracts
Compiling ./sol/IncrementalMerkleTree.sol...
Compiling ./sol/MiMC.sol...
Compiling ./sol/Ownable.sol...
Compiling ./sol/Semaphore.sol...
Compiling ./sol/SnarkConstants.sol...
Compiling ./sol/verifier.sol...
Compiling ./sol/IncrementalMerkleTree.sol...
Compiling ./sol/IncrementalMerkleTreeClient.sol...
Compiling ./sol/MiMC.sol...
Compiling ./sol/Ownable.sol...
Compiling ./sol/Semaphore.sol...
Compiling ./sol/SemaphoreClient.sol...
Compiling ./sol/SnarkConstants.sol...
Compiling ./sol/verifier.sol...
Compilation finished successfully
internal/modules/cjs/loader.js:670
    throw err;
    ^

Error: Cannot find module '/Users/username/semaphore-card/semaphore/contracts/build/buildMiMC.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:668:15)
    at Function.Module._load (internal/modules/cjs/loader.js:591:27)
    at Function.Module.runMain (internal/modules/cjs/loader.js:877:12)
    at internal/main/run_main_module.js:21:11
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! semaphore-contracts@0.0.1 compileSol: `./scripts/compileSol.sh`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the semaphore-contracts@0.0.1 compileSol script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/username/.npm/_logs/2021-10-07T14_45_56_685Z-debug.log

/semaphore/contracts/build/has not been created. Does anyone know the cause & solution for this problem?

package versions

% solc --version    
solc, the solidity compiler commandline interface
Version: 0.5.12+commit.7709ece9.Darwin.appleclang
% node -v
v11.14.0
barryWhiteHat commented 3 years ago

@akinovak is https://github.com/akinovak/fast-semaphore the best place to go to compile semaphore without errors ?

akinovak commented 3 years ago

Yes, please refer here https://github.com/akinovak/sem-contracts for contracts and here https://github.com/akinovak/semaphore-lib for library and test-examples.

akinovak commented 3 years ago

Also, it will be announced as an official version in the next few days.

adust09 commented 3 years ago

Thanks! I'll check out the repositories you referred me to. Looks like I'd better wait for the official release.

weijiekoh commented 3 years ago

@adust09 It is well worth trying the repositories that @akinovak linked to as the original Semaphore code uses a lot of outdated dependencies and it could be challenging to get it to work.

akinovak commented 3 years ago

Hi @adust09, you can check https://github.com/appliedzkp/libsemaphore.git and https://github.com/appliedzkp/semaphore.git#version/2.0.0.

Feel free to ping me for discussion/help with that :)

adust09 commented 3 years ago

I admire your work🎉

I'll check the code and get back, if I have any questions.

akinovak commented 3 years ago

Thanks but it’s not just me, there are more people credible :)

I saw that semaphore-cards repo of yours, can’t wait to see what are you up to!

On Sun, Oct 10, 2021 at 3:49 PM adust09 @.***> wrote:

I admire your work🎉

I'll check the code and get back, if I have any questions.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/appliedzkp/semaphore/issues/60#issuecomment-939485707, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG2SN5OH344NDPJKCT3STT3UGGKV3ANCNFSM5FRP4RAQ .