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

[cli] Solution for build error contractkit on Linux 19.04 distro #960

Merged
merged 15 commits into from
Sep 28, 2019

Conversation

diminator
Copy link
Contributor

Description

Solution to build error cannot find module @celo/contractkit

Tested

Works on Linux 19.04 distro

Related issues

No issue was created

@diminator diminator changed the title Solution for build error contractkit on Linux 19.04 distro [cli] Solution for build error contractkit on Linux 19.04 distro Sep 13, 2019
packages/cli/README.md Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Sep 17, 2019

Codecov Report

Merging #960 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #960   +/-   ##
=======================================
  Coverage   66.59%   66.59%           
=======================================
  Files         257      257           
  Lines        7394     7394           
  Branches      494      494           
=======================================
  Hits         4924     4924           
  Misses       2373     2373           
  Partials       97       97
Flag Coverage Δ
#mobile 66.59% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 29fa6b0...7159bec. Read the comment docs.

Make sure you do NOT overwrite any existing contracts, migrations or tests.

```bash
> npm i -g truffle
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this sounds weird...
why would you need to initialize truffle?

Do you have a more specific error log?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

node v8.16.1
Linux dimi-xps 4.15.0-60-generic #67-Ubuntu SMP Thu Aug 22 16:55:30 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
`

> git clone git@github.com:celo-org/celo-monorepo.git
> yarn
> cd packages/protocol/
> yarn build
yarn run v1.17.3
$ ts-node ./scripts/build.ts && yarn build:ts
Compiling
Warning: Both truffle-config.js and truffle.js were found. Using truffle-config.js.

Compiling your contracts...
===========================
> Everything is up to date, there is nothing to compile.

{ Error: ENOENT: no such file or directory, open '/home/dimi/celo/celo-monorepo-test/packages/protocol/build/contracts/Proxy.json'

Observations:

  • Truffle doesn't recognize the contracts directory
  • Truffle is finding some truffle-config.js (there's a few in the node_modules, maybe somewhere else on my system)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

renaming protocol/truffle.js to protocol/truffle-config.js is a potential fix

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that sounds more reasonable.
Still is strange that none other has the same issue... are you using yarn or npm?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

> yarn
> cd packages/protocol/
> yarn build

Copy link
Contributor Author

@diminator diminator Sep 19, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe you can test by adding an empty truffle-config.js and try building?

so you can see if your truffle is also having that config pref

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry a bit confused here

we started by saying that we need to do truffle init to make the repo build on linux. That's what i found strange. Surely the truffle-config.js is a result of running init, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand the confusion. Forget about the truffle init solution.

When I do a vanilla yarn && yarn build on the repo I get the error. So without init.
Seems that truffle finds somewhere truffle-config.js it will prefer that one over the existing truffle.js. That seems to be the case for me.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if it's an actual issue or just something on my local device due to previous projects using ganache

@diminator
Copy link
Contributor Author

@mcortesi I reframed the error. Is this good to go?

Copy link
Contributor

@mcortesi mcortesi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved...

but can't we just change truffle.js to truffle-config.js?

@diminator
Copy link
Contributor Author

approved...

but can't we just change truffle.js to truffle-config.js?

that would be too easy :)

@diminator diminator closed this Sep 26, 2019
@diminator diminator reopened this Sep 26, 2019
Copy link
Contributor

@mcortesi mcortesi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

@timmoreton timmoreton added the automerge Have PR merge automatically when checks pass label Sep 27, 2019
@ashishb ashishb merged commit 0c948a7 into celo-org:master Sep 28, 2019
aaronmgdr added a commit that referenced this pull request Oct 1, 2019
* master: (31 commits)
  Upgrade to Node 10 (#1148)
  [faucet] Add custom metrics (#1143)
  Add IdentityMetadata to Contractkit (#1126)
  [Wallet] Local currency v1.1 (#1137)
  Add attestation-service deploy (#1128)
  [Wallet] A few docs and build cleanup (#1138)
  [CircleCI]Add comment on how to fix lint checks (#1134)
  2019-09-30 integration deployment (#1149)
  Update web3 provider to new integration url (#1151)
  [celotool]Add fast mode to celotool invite (#1135)
  Revert "Feature/909 proxy delegatecall" (#1146)
  Use contractkit in notification service (#1118)
  Feature/909 proxy delegatecall (#1003)
  integration deployment for 2019-09-29 (#1139)
  Add instructions for npm publication to tag commit (#1117)
  Client Logs Data Flow script update (#1055)
  Deploying latest proxy code in genesis (#1122)
  Enable floating promises check everywhere (fix issues) (#1115)
  [cli] Solution for build error contractkit on Linux 19.04 distro (#960)
  [Wallet] Merge back changes made for mx pilot (#1113)
  ...

# Conflicts:
#	yarn.lock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Have PR merge automatically when checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants