-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Fatal error: Cannot read property 'code' of undefined #32
Comments
Sounds like your solidity compiler (or web3) is returning an unexpected object when compiling your contract. Can you run |
Sure thing
|
Hmm, for some reason your output doesn't show what's being returned from web3. You should be getting output like this, where the input to web3 (specified by lines starting with |
Nope, thats all I'm getting. |
That's odd. I can't debug the issue without that output. Can you tell me what truffle version you're running? |
Truffle v0.0.16 |
Super weird. What Ethereum client are you using? |
Would you mind upgrading to the latest Truffle on master and running the same command?
I'm assuming it has something to do with your Ethereum client, however, so I wouldn't be surprised if after following the steps above you receive the same error. |
Sure thing. Here's my geth
|
Looks like a lot more came back this time =) Aakils-Mac-mini:truffle aakilfernandes$ truffle compile --verbose-rpc
|
Awesome, this is exactly what I needed. Looking into it. |
Okay, so I hate to say this, but Truffle makes some assumptions about your contracts and so enforces those assumptions. Truffle can't find the compiled version of your code returned from your client because your contract name Thanks for going through all this run around. Can't believe I didn't notice this before. |
I could likely detect this case and print a warning message. |
Nice =D. Looks like it works. No problem glad to help. Thanks for the framework! |
Merge develop -> master for Truffle 4 release
Alpha: One-off Tezos deployments (demo)
Alpha: One-off Tezos deployments (demo)
Getting this when I run
truffle compile
Contract here: https://github.com/etherpot/contract/blob/master/app/contracts/lotto.sol
The text was updated successfully, but these errors were encountered: