Unexpected error: Cannot provision contracts while instantiating the console

0 votes

I have created a truffle project. I was successfully able to compile and migrate the contract. After this when I try to open truffle console, I am getting the following error:

**Enexpected error: Cannot provision contracts while instantiating the console.
truffle(development)> TypeError: Cannot read property 'forEach' of undefined
    at TruffleInterpreter.resetContractsInConsoleContext (/usr/local/lib/node_modules/truffle/lib/repl.js:95:17)
    at /usr/local/lib/node_modules/truffle/lib/repl.js:44:12**
Jan 23, 2019 in Blockchain by Nimisha
88 views

1 answer to this question.

0 votes

This is a common problem with truffle that happens due to the build files. In the data directory, you should have a directory name build, delete this directory and try to open truffle console. 

answered Jan 23, 2019 by Omkar
• 69,060 points

Related Questions In Blockchain

0 votes
1 answer

Web3j v3.3.1 : Error while generating compiled solidity smart contracts which returns array of struct

Solidity does not support returning structs in ...READ MORE

answered Jun 19, 2018 in Blockchain by aryya
• 7,350 points
366 views
0 votes
1 answer
0 votes
1 answer

Error in playground while committing transaction on the ledger

1. Is this transaction is trying to ...READ MORE

answered Jul 27, 2018 in Blockchain by shweta
• 440 points
53 views
+1 vote
0 answers

cryptogen: error: open ./crypto-config.yaml: The system cannot find the file specified

I created a generate.sh to generate crypto ...READ MORE

Mar 1, 2019 in Blockchain by Tharindu
• 170 points

closed Mar 1, 2019 by Tharindu 420 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,810 points
297 views
0 votes
1 answer
0 votes
1 answer

Solidity geth: Error encountered during contract execution [Bad instruction]

recipes is a dynamic storage array. You need ...READ MORE

answered Oct 15, 2018 in Blockchain by Omkar
• 69,060 points
184 views
0 votes
1 answer
+1 vote
1 answer

Error while instantiating chaincode

Hey @Vikas!  The error says, dial unix /host/var/run/docker.sock: connect: ...READ MORE

answered Nov 6, 2018 in Blockchain by Omkar
• 69,060 points
354 views
+15 votes
2 answers

What are the various blockchain smart contracts platforms?

While Ethereum is the most popular platform ...READ MORE

answered Mar 26, 2018 in Blockchain by Johnathon
• 9,090 points
168 views