minting.forEach is not a function.
Closed this issue · 1 comments
rustiixx commented
Hi! I'm trying to use cardanocli-js to mint a NFT and as I am building the transaction, I get this error:
mikey@mikey:~/cardano-minter$ node src/mint-asset.js
/home/mikey/node_modules/cardanocli-js/helper.js:199
minting.forEach((mint, index, arr) => {
^
TypeError: minting.forEach is not a function
at exports.mintToString (/home/mikey/node_modules/cardanocli-js/helper.js:199:11)
at CardanocliJs.transactionBuildRaw (/home/mikey/node_modules/cardanocli-js/index.js:888:39)
at buildTransaction (/home/mikey/cardano-minter/src/mint-asset.js:66:25)
at Object.<anonymous> (/home/mikey/cardano-minter/src/mint-asset.js:77:13)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
at internal/main/run_main_module.js:17:47
I've tried doing a full reinstall of cardanocli-js, but this problem still occurs.
jbergeron03 commented
@rustiixx make sure you're passing correctly the options to transactionBuildRaw. I think your mint attribute is not an array and it should be.