# Not able to generate the typegen types

**URL:** <https://forum.fuel.network/t/not-able-to-generate-the-typegen-types/7325>\
**Category:** TypeScript SDK\
**Created:** [December 11, 2024, 9:21am UTC](https://forum.fuel.network/t/not-able-to-generate-the-typegen-types/7325 "2024-12-11T09:21:56Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![lokesh-lync](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/lokesh-lync/32/2902_2.png) [@lokesh-lync](https://forum.fuel.network/u/lokesh-lync)\
**Post date:** [December 11, 2024, 9:21am UTC](https://forum.fuel.network/t/not-able-to-generate-the-typegen-types/7325/1 "2024-12-11T09:21:56Z")

</div>

When I run the command:

```auto
pnpm fuels typegen -i ./out/release/LyncIgnite-abi.json -o ./typegen

```

I get this:

```auto
using deprecated parameters for the initialization function; pass a single object instead
error: Cannot read properties of null (reading 'map')

```

My `fuel-toolchain.toml`

```auto
[toolchain]
channel = "nightly-x86_64-unknown-linux-gnu"

[components]
forc = "0.66.5+nightly.20241211.ff8291a2b1"
fuel-core = "0.40.0+nightly.20241211.ab053a8511"

```

- `fuelup show`

```auto
Default host: x86_64-unknown-linux-gnu
fuelup home: /home/tit4n/.fuelup

Installed toolchains
--------------------
latest-x86_64-unknown-linux-gnu (default)
nightly-x86_64-unknown-linux-gnu (override)
beta-5-x86_64-unknown-linux-gnu
nightly-2024-04-12-x86_64-unknown-linux-gnu
nightly-2024-05-28-x86_64-unknown-linux-gnu
nightly-2024-10-04-x86_64-unknown-linux-gnu
testnet-x86_64-unknown-linux-gnu

active toolchain
----------------
nightly-x86_64-unknown-linux-gnu (override), path: /home/tit4n/lync/fuel/Fuel-Contracts/LyncIgnite/fuel-toolchain.toml
  forc : 0.66.5+nightly.20241211.ff8291a2b1
    - forc-client
      - forc-deploy : 0.66.5+nightly.20241211.ff8291a2b1
      - forc-run : 0.66.5+nightly.20241211.ff8291a2b1
    - forc-crypto : 0.66.5+nightly.20241211.ff8291a2b1
    - forc-debug : 0.66.5+nightly.20241211.ff8291a2b1
    - forc-doc : 0.66.5+nightly.20241211.ff8291a2b1
    - forc-fmt : 0.66.5+nightly.20241211.ff8291a2b1
    - forc-lsp : 0.66.5+nightly.20241211.ff8291a2b1
    - forc-tx : 0.66.5+nightly.20241211.ff8291a2b1
    - forc-wallet : 0.11.1+nightly.20241211.f4052012e0
  fuel-core : 0.40.0+nightly.20241211.ab053a8511
  fuel-core-keygen : not found

```

```auto
pnpm fuels -v
using deprecated parameters for the initialization function; pass a single object instead
0.97.1

```

---

<div class="post-metadata">

**Author:** ![AzrielTheHellrazor](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/azrielthehellrazor/32/3715_2.png) [@AzrielTheHellrazor](https://forum.fuel.network/u/AzrielTheHellrazor)\
**Post date:** [December 11, 2024, 11:12am UTC](https://forum.fuel.network/t/not-able-to-generate-the-typegen-types/7325/2 "2024-12-11T11:12:13Z")

</div>

I don’t know why but when i used bun instead of pnpm it worked for me

---

<div class="post-metadata">

**Author:** ![p.s](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/p.s/32/2491_2.png) [@p.s](https://forum.fuel.network/u/p.s)\
**Post date:** [December 11, 2024, 11:57am UTC](https://forum.fuel.network/t/not-able-to-generate-the-typegen-types/7325/3 "2024-12-11T11:57:06Z")

</div>

Hey @lokesh-lync 👋

Could you send over the output from ` tree ./path/to/contract`? (An example is below)

```console
tree ./sway/blackjack-contract
./sway/blackjack-contract
├── Forc.toml
├── out
│ └── debug
│ ├── blackjack-contract-abi.json
│ ├── blackjack-contract-storage_slots.json
│ └── blackjack-contract.bin
└── src
    └── main.sw

4 directories, 5 files

```

---

<div class="post-metadata">

**Author:** ![lokesh-lync](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/lokesh-lync/32/2902_2.png) [@lokesh-lync](https://forum.fuel.network/u/lokesh-lync)\
**Post date:** [December 11, 2024, 1:35pm UTC](https://forum.fuel.network/t/not-able-to-generate-the-typegen-types/7325/4 "2024-12-11T13:35:01Z")

</div>

Here it is:

```auto
➜ tree . -I node_modules
.
├── Forc.lock
├── Forc.toml
├── fuel-toolchain.toml
├── out
│ └── release
│ ├── LyncIgnite-abi.json
│ ├── LyncIgnite.bin
│ └── LyncIgnite-storage_slots.json
├── package.json
├── pnpm-lock.yaml
├── README.md
├── scripts
│ ├── deploy.ts
│ └── test_contract.ts
└── src
    ├── events.sw
    ├── interface.sw
    └── main.sw

5 directories, 14 files

```

---

<div class="post-metadata">

**Author:** ![p.s](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/p.s/32/2491_2.png) [@p.s](https://forum.fuel.network/u/p.s)\
**Post date:** [December 11, 2024, 4:03pm UTC](https://forum.fuel.network/t/not-able-to-generate-the-typegen-types/7325/5 "2024-12-11T16:03:26Z")

</div>

Could you send me the contents of your `/out/release/` folder or share a repository so that I can examine it more closely?

One suggestion would be to use the `latest` toolchain, rather than the nightly one.

---

<div class="post-metadata">

**Author:** ![lokesh-lync](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/lokesh-lync/32/2902_2.png) [@lokesh-lync](https://forum.fuel.network/u/lokesh-lync)\
**Post date:** [December 12, 2024, 7:43am UTC](https://forum.fuel.network/t/not-able-to-generate-the-typegen-types/7325/7 "2024-12-12T07:43:45Z")

</div>

it worked with `latest` had to delete the old `out` folder to see the difference.

---

<div class="post-metadata">

**Author:** ![p.s](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/p.s/32/2491_2.png) [@p.s](https://forum.fuel.network/u/p.s)\
**Post date:** [December 12, 2024, 7:54am UTC](https://forum.fuel.network/t/not-able-to-generate-the-typegen-types/7325/8 "2024-12-12T07:54:48Z")

</div>

@lokesh-lync Wonderful!

Glad you managed to resolve the issue 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex022/uploads/fuel/original/2X/5/57d5a345cc15a64b636e0d56e042857f8a0e80b1.png) [@system](https://forum.fuel.network/u/system)\
**Post date:** [January 2, 2025, 3:55am UTC](https://forum.fuel.network/t/not-able-to-generate-the-typegen-types/7325/9 "2025-01-02T03:55:13Z")

</div>

Closed on January 2, 2025, 3:55am UTC

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.
