Not able to migrate truffle project even after running testrpc

0 votes

I have written a smart contract and I am trying to migrate it. At first I hadnt started testrpc so I was getting error but even after starting testrpc I am getting same error:

Command:

truffle migrate

Error:

EthereumJS TestRPC v6.0.3 (ganache-core: 2.0.2)

/usr/local/lib/node_modules/ethereumjs-testrpc/build/cli.node.js:74143

var Module;if(!Module)Module=(typeof Module!=="undefined"?Module:null)||{};var moduleOverrides={};for(var key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}var ENVIRONMENT_IS_WEB=false;var ENVIRONMENT_IS_WORKER=false;var ENVIRONMENT_IS_NODE=false;var ENVIRONMENT_IS_SHELL=false;if(Module["ENVIRONMENT"]){if(Module["ENVIRONMENT"]==="WEB"){ENVIRONMENT_IS_WEB=true}else if(Module["ENVIRONMENT"]==="WORKER"){ENVIRONMENT_IS_WORKER=true}else if(Module["ENVIRONMENT"]==="NODE"){ENVIRONMENT_IS_NODE=true}else if(Module["ENVIRONMENT"]==="SHELL"){ENVIRONMENT_IS_SHELL=true}else{throw new Error("The provided Module['ENVIRONMENT'] value is not valid. It must be one of: WEB|WORKER|NODE|SHELL.")}}else{ENVIRONMENT_IS_WEB=typeof window==="object";ENVIRONMENT_IS_WORKER=typeof importScripts==="function";ENVIRONMENT_IS_NODE=typeof process==="object"&&"function"==="function"&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER;ENVIRONMENT_IS_


Error: listen EADDRINUSE :::8545

    at Object._errnoException (util.js:1022:11)

    at _exceptionWithHostPort (util.js:1044:20)

    at Server.setupListenHandle [as _listen2] (net.js:1367:14)

    at listenInCluster (net.js:1408:12)

    at Server.listen (net.js:1492:7)

    at Server.server.listen (/usr/local/lib/node_modules/ethereumjs-testrpc/build/cli.node.js:106030:17)

    at Object.<anonymous> (/usr/local/lib/node_modules/ethereumjs-testrpc/build/cli.node.js:50244:8)

    at __webpack_require__ (/usr/local/lib/node_modules/ethereumjs-testrpc/build/cli.node.js:21:30)

    at /usr/local/lib/node_modules/ethereumjs-testrpc/build/cli.node.js:64:18

    at Object.<anonymous> (/usr/local/lib/node_modules/ethereumjs-testrpc/build/cli.node.js:67:10)
Dec 11, 2018 in Blockchain by slayer
• 29,350 points
613 views

1 answer to this question.

0 votes

Maybe you forgot to compile the project first? You have to compile before you can migrate. 

truffle compile
truffle migrate
answered Dec 11, 2018 by Omkar
• 69,210 points

Related Questions In Blockchain

–1 vote
1 answer

Not able to compile truffle project

Hi. If you look at the error ...READ MORE

answered Jan 17, 2019 in Blockchain by Omkar
• 69,210 points
1,622 views
0 votes
1 answer
0 votes
1 answer
0 votes
2 answers

Truffle migrate Error after run testrpc

Simple Solution: // module.exports = { // ...READ MORE

answered Sep 24, 2018 in Blockchain by Wasim
597 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,790 points
1,690 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,232 views
0 votes
1 answer
0 votes
1 answer

Not able to start testrpc for Ethereum truffle

Hey. It seems like you already have ...READ MORE

answered Nov 28, 2018 in Blockchain by Omkar
• 69,210 points
671 views
0 votes
1 answer

Not able to migrate contract in Truffle: Error: No network specified. Cannot determine current network

Make these entries in truffle.js file: module.exports = { ...READ MORE

answered Nov 30, 2018 in Blockchain by Omkar
• 69,210 points
921 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP