Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minting.forEach is not a function. #25

Closed
rustiixx opened this issue Nov 19, 2021 · 1 comment
Closed

minting.forEach is not a function. #25

rustiixx opened this issue Nov 19, 2021 · 1 comment

Comments

@rustiixx
Copy link

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
Copy link

@rustiixx make sure you're passing correctly the options to transactionBuildRaw. I think your mint attribute is not an array and it should be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants