<p>I checked the <a href="https://www.npmjs.com/package/cardanocli-js" rel="nofollow noreferrer">npm page</a> for cardanocli-js and found that you need to pass an options object to the AddressBuild method.</p>
<pre><code>
const createWallet = (account) =&gt; {
  cardano.addressKeyGen(account);
  cardano.stakeAddressKeyGen(account);
  cardano.stakeAddressBuild(account);
  cardano.addressBuild(account);
  return cardano.wallet(account);
};

createWallet(&quot;ADAPI&quot;);
</code></pre>
<p>needs to be altered to include an options object per the documentation.</p>
<p>It should be altered to be;</p>
<pre><code>
const createWallet = (account) =&gt; {
  const payment = cardano.addressKeyGen(account);
  const stake = cardano.stakeAddressKeyGen(account);
  cardano.stakeAddressBuild(account);
  cardano.addressBuild(account, {
    paymentVkey: payment.vkey,
    stakeVkey: stake.vkey,
  });
  return cardano.wallet(account);
};

createWallet(&quot;ADAPI&quot;);
</code></pre>
<p>This worked for me. I hope this helps.</p>

CC BY-SA 4.0
2021-09-12T21:49:08.873Z
Thank you! Worked for me also. You Rock dude.
Marcelo Arraes Teixeira
CC BY-SA 4.0
2021-09-11T17:17:26.527Z
2021-09-11T17:17:26.527Z
Landen
<p>I am also having the same problem on window using cardano-node-1.29.0-win64.  cardanocli-js node module has issue on windows doesn't know how to create folder correctly, I need to modified &quot;index.js&quot; file.  After fixing all that I finally run into the same problem you are facing.</p>
<p>For ubuntu, I got some weird problems not able to access my cardano-cli even I have it in my path, node is having trouble accessing.</p>

CC BY-SA 4.0
2021-09-03T04:01:57.553Z
I tried to build it manually by passing in skey and vkey files but no luck still, any help would be appreciated.
Gyden
CC BY-SA 4.0
2021-09-03T03:24:08.287Z
2021-09-03T03:24:08.287Z
Gyden
<p>Im using linux-Ubuntu in the WSL of the Windows 10.
I have installed Cardano-node and Cardano-cli. Node v14 (latest stable version) ghc 8.10.6</p>
<p>Im trying to create a wallet but on this command:
<code>node src/create-wallet.js</code></p>
<p>I get this error:</p>
<pre><code>const paymentVkey = options.paymentVkey
                                ^
TypeError: Cannot read property 'paymentVkey' of undefined
    at CardanocliJs.addressBuild (/home/marcelolinux/minter3/node_modules/cardanocli-js/index.js:316:33)
    at createWallet (/home/marcelolinux/minter3/src/create-wallet.js:7:11)
    at Object.&lt;anonymous&gt; (/home/marcelolinux/minter3/src/create-wallet.js:11:1)
</code></pre>
<p>Im following <a href="https://github.com/armada-alliance/cardano-minter" rel="nofollow noreferrer">this</a> (maybe) out of date tutorial.</p>
<p>I'have tryed with ghc 8.10.4 , also tryed configure the testnet but did'nt work also.</p>
<p>Can anyone help me to Mint Nft's using Javascript? I'm needing it for my final project of a course of Web Development.</p>

<wallet><nft><mint><vscode><java>
Problem with creation of wallet using Javascript
# Problem with creation of wallet using Javascript

(Asked by: username_0 on 2021-08-27)

Im using linux-Ubuntu in the WSL of the Windows 10.
I have installed Cardano-node and Cardano-cli. Node v14 (latest stable version) ghc 8.10.6
Im trying to create a wallet but on this command:
node src/create-wallet.js
I get this error:
const paymentVkey = options.paymentVkey
                                ^
TypeError: Cannot read property 'paymentVkey' of undefined
    at CardanocliJs.addressBuild (/home/marcelolinux/minter3/node_modules/cardanocli-js/index.js:316:33)
    at createWallet (/home/marcelolinux/minter3/src/create-wallet.js:7:11)
    at Object. (/home/marcelolinux/minter3/src/create-wallet.js:11:1)

Im following this (maybe) out of date tutorial.
I'have tryed with ghc 8.10.4 , also tryed configure the testnet but did'nt work also.
Can anyone help me to Mint Nft's using Javascript? I'm needing it for my final project of a course of Web Development.

**Tags:** wallet, nft, mint, vscode, java

---

## 2 answers

### Answer by username_1 on 2021-09-11. Score: 3 | Accepted answer

I checked the npm page for cardanocli-js and found that you need to pass an options object to the AddressBuild method.

const createWallet = (account) => {
  cardano.addressKeyGen(account);
  cardano.stakeAddressKeyGen(account);
  cardano.stakeAddressBuild(account);
  cardano.addressBuild(account);
  return cardano.wallet(account);
};

createWallet("ADAPI");

needs to be altered to include an options object per the documentation.
It should be altered to be;

const createWallet = (account) => {
  const payment = cardano.addressKeyGen(account);
  const stake = cardano.stakeAddressKeyGen(account);
  cardano.stakeAddressBuild(account);
  cardano.addressBuild(account, {
    paymentVkey: payment.vkey,
    stakeVkey: stake.vkey,
  });
  return cardano.wallet(account);
};

createWallet("ADAPI");

This worked for me. I hope this helps.

> **Comments:**
> **username_0**: Thank you! Worked for me also. You Rock dude.  

---

### Answer by username_2 on 2021-09-03. Score: 1

I am also having the same problem on window using cardano-node-1.29.0-win64. cardanocli-js node module has issue on windows doesn't know how to create folder correctly, I need to modified "index.js" file. After fixing all that I finally run into the same problem you are facing.

For ubuntu, I got some weird problems not able to access my cardano-cli even I have it in my path, node is having trouble accessing.

> **Comments:**
> **username_2**: I tried to build it manually by passing in skey and vkey files but no luck still, any help would be appreciated.  

---

