Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

237
Views
TypeError: no se pueden leer las propiedades de undefined (leyendo ': votando')

Recibo este tipo de error cuando intento ejecutar este archivo en localhost

 TypeError: Cannot read properties of undefined (reading ':Voting') at C:\Users\Evote\index.js:93:53 at Layer.handle [as handle_request] (C:\Users\Evote\node_modules\express\lib\router\layer.js:95:5) at next (C:\Users\Evote\node_modules\express\lib\router\route.js:137:13) at Route.dispatch (C:\Users\Evote\node_modules\express\lib\router\route.js:112:3) at Layer.handle [as handle_request] (C:\Users\Evote\node_modules\express\lib\router\layer.js:95:5) at C:\Users\Evote\node_modules\express\lib\router\index.js:281:22 at Function.process_params (C:\Users\Evote\node_modules\express\lib\router\index.js:335:12) at next (C:\Users\Evote\node_modules\express\lib\router\index.js:275:10) at SendStream.error (C:\Users\Evote\node_modules\serve-static\index.js:121:7) at SendStream.emit (node:events:390:28) at SendStream.error (C:\Users\Evote\node_modules\send\index.js:270:17) at SendStream.onStatError (C:\Users\Evote\node_modules\send\index.js:421:12) at next (C:\Users\Evote\node_modules\send\index.js:736:16) at onstat (C:\Users\Evote\node_modules\send\index.js:725:14) at FSReqCallback.oncomplete (node:fs:198:21)

este es mi codigo

 app.get('/info', function(req, res){ var cookie_pass = req.cookies['auth']; var cookie_otp = req.cookies['show']; if (cookie_pass == null || cookie_pass == '' || cookie_otp == null || cookie_otp == '') { res.redirect('/app'); } else { web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545")); code = fs.readFileSync('Voting.sol').toString() compiledCode = solc.compile(code) abiDefinition = JSON.parse(compiledCode.contracts[':Voting'].interface) VotingContract = web3.eth.contract(abiDefinition) byteCode = compiledCode.contracts[':Voting'].bytecode deployedContract = VotingContract.new(['Sanat','Aniket','Mandar','Akshay'],{data: byteCode, from: web3.eth.accounts[0], gas: 4700000}) contractInstance = VotingContract.at(deployedContract.address) res.sendFile(path.join(__dirname, 'ui', 'clist.html')); } });

el error esta en la linea

abiDefinition=JSON.parse(compiledCode.contratos[':Votación'].interfaz)

Estaba tratando de construir un sistema de votación basado en la red ethereum y cuando ejecuto el código, aparece como un error de tipo

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!