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

319
Views
Error al evaluar la transacción: TypeError: no se pueden leer las propiedades de undefined (leyendo 'toString') reactJS

código de interfaz reactJS:

 await axios .put("http://localhost:8080/api/updateBudget/"+gmail, bud) .then((response) => { console.log(response); }) .catch((error) => { if (error.response) { console.log(error.response); console.log("server responded"); } else if (error.request) { console.log("network error"); } else { console.log(error); } });

Código de fondo NodeJS:

 app.put('/api/updateBudget/:gmail', async function (req, res) { try { const ccpPath = path.resolve(__dirname, '..', 'dev','fabric-samples','test-network', 'organizations', 'peerOrganizations', 'org1.example.com', 'connection-org1.json'); const ccp = JSON.parse(fs.readFileSync(ccpPath, 'utf8')); const walletPath = path.join(process.cwd(), 'wallet'); const wallet = await Wallets.newFileSystemWallet(walletPath); console.log(`Wallet path: ${walletPath}`); const identity = await wallet.get('appUser'); if (!identity) { console.log('An identity for the user "appUser" does not exist in the wallet'); console.log('Run the registerUser.js application before retrying'); return; } const gateway = new Gateway(); await gateway.connect(ccp, { wallet, identity: 'appUser', discovery: { enabled: true, asLocalhost: true } }); const network = await gateway.getNetwork('testchannel'); const contract = network.getContract('supply_chain'); await contract.submitTransaction('updateBudget',req.body.gmail,req.body.bud); console.log('Transaction has been submitted'); res.send('Transaction has been submitted'); await gateway.disconnect(); } catch (error) { console.error(`Failed to evaluate transaction: ${error}`); process.exit(1); } });

Recibo un error de red en la consola y tipeoError en la terminal cada vez que presiono la API. En el frontend he usado ReactJS y en el backend he usado NodeJS y estoy almacenando datos en blockchain.

about 4 years ago · Santiago Gelvez
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!