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 not working #2

Open
julianmrodri opened this issue Jan 27, 2020 · 2 comments
Open

NPM Install not working #2

julianmrodri opened this issue Jan 27, 2020 · 2 comments

Comments

@julianmrodri
Copy link

Hi. Tried to install via NPM using npm install -g generate-contract-interface and other methods and did not work. Im getting the following error:

npm ERR! code 128
npm ERR! Command failed: git checkout 326da052567245c9d9a0ba941bd9923aa89cda84
npm ERR! fatal: reference is not a tree: 326da052567245c9d9a0ba941bd9923aa89cda84Usi

I tried updating all npm packages. re installing everything, deleting the package-lock.json but I cannot install it, always getting that same error.
Using MacOS Catalina and Node 10.16.0. Attached is the error log
2020-01-27T13_48_37_878Z-debug.log
.

josojo added a commit to gnosis/dex-contracts that referenced this issue Jan 31, 2020
This PR is intended to replace the PR #500. While #500 worked perfectly fine, the new code here is much easier to understand and hence preferred.

The current deployment scripts have a bug: During the deployment for non-testnet networks, the scripts would try to work with the local artifacts, rather than the artifacts from the imported npm packages with the correct addresses.

This PR fixes this by introducing a different logic for the testnet migration and the non-testnet migration.
Thanks for the help @fleupold

testplan:
run migration against local testnetwork

yarn install
npx truffle migrate --reset
run migration against rinkeby

yarn install
export PK=... <Rinkeby key>
npx truffle migrate --reset --network rinkeby
run migration of https://github.com/gnosis/dex-contracts-integration-example
=>

cd dex-contracts
yarn install
yarn link
cd -
git clone https://github.com/gnosis/dex-contracts-integration-example
cd dex-contracts-integration-example
git pull origin
rm -r build
npx truffle compile
"update the @gnosis.pm/dex-contracts package reference in package.json to your folder"
yarn install
npx truffle migrate --reset
Note: I would have preferred to publish to generate the interface contract in dex-contracts-integration-example automatically from the artifact. But I can not find a script for it.
Also, the package for generating interface contracts is currently broken. raineorshine/generate-contract-interface#2
I suggest to wait and rely on manual interface contracts for now. You can find in the example here: https://github.com/gnosis/dex-contracts-integration-example/blob/master/contracts/BatchExchangeInterface.sol
@samajammin
Copy link

I'm having this same issue. Would love to try out this tool! Looks useful 😄

@blockchainguyy
Copy link

Facing the same issue, was it solved?

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

3 participants