kushaal veijay
Jul 27, 2017 · 1 min read

Hi Murthy,

Thanks for this wonderful post on getting started with Ethereum.

I was able to compile the code, however I am getting following error while deploying the contract

deployedContract = VotingContract.new([‘Rama’,’Nick’,’Jose’],{data: byteCode, from: web3.eth.accounts[0], gas: 4700000})
TypeError: VotingContract.new is not a function
at repl:1:38
at ContextifyScript.Script.runInThisContext (vm.js:44:33)
at REPLServer.defaultEval (repl.js:239:29)
at bound (domain.js:301:14)
at REPLServer.runBound [as eval] (domain.js:314:12)
at REPLServer.onLine (repl.js:433:10)
at emitOne (events.js:120:20)
at REPLServer.emit (events.js:210:7)
at REPLServer.Interface._onLine (readline.js:278:10)
at REPLServer.Interface._line (readline.js:625:8)
at REPLServer.Interface._ttyWrite (readline.js:905:14)
at REPLServer.self._ttyWrite (repl.js:502:7)
at ReadStream.onkeypress (readline.js:157:10)
at emitTwo (events.js:125:13)
at ReadStream.emit (events.js:213:7)
at emitKeys (internal/readline.js:420:14)
at emitKeys.next (<anonymous>)
at ReadStream.onData (readline.js:1006:36)
at emitOne (events.js:115:13)
at ReadStream.emit (events.js:210:7)
at addChunk (_stream_readable.js:252:12)
at readableAddChunk (_stream_readable.js:239:11)

What could be the error on my setup?

    kushaal veijay

    Written by