# TypeError: cannot read the properties of undefined (reading 'ProgramType')

**URL:** <https://forum.fuel.network/t/typeerror-cannot-read-the-properties-of-undefined-reading-programtype/3410>\
**Category:** General\
**Created:** [October 29, 2023, 12:07pm UTC](https://forum.fuel.network/t/typeerror-cannot-read-the-properties-of-undefined-reading-programtype/3410 "2023-10-29T12:07:25Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![alarimoore](https://avatars.discourse-cdn.com/v4/letter/a/7c8e57/32.png) [@alarimoore](https://forum.fuel.network/u/alarimoore)\
**Post date:** [October 29, 2023, 12:07pm UTC](https://forum.fuel.network/t/typeerror-cannot-read-the-properties-of-undefined-reading-programtype/3410/1 "2023-10-29T12:07:25Z")

</div>

Topic discussion checklist

- the above error message is what i get when i run this command ( ```  
npx fuels typegen -i …/counter-contract/out/debug/\*-abi.json -o ./src/contracts)

```auto

```

---

<div class="post-metadata">

**Author:** ![calldelegation](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/calldelegation/32/1484_2.png) [@calldelegation](https://forum.fuel.network/u/calldelegation)\
**Post date:** [October 30, 2023, 3:54pm UTC](https://forum.fuel.network/t/typeerror-cannot-read-the-properties-of-undefined-reading-programtype/3410/2 "2023-10-30T15:54:43Z")

</div>

Hey @alarimoore can you post your Sway contract so I can take a look or were you just simply following the quickstart? I understand you’re doing this for the frontend but i need more information about the versions you are on.

---

<div class="post-metadata">

**Author:** ![alarimoore](https://avatars.discourse-cdn.com/v4/letter/a/7c8e57/32.png) [@alarimoore](https://forum.fuel.network/u/alarimoore)\
**Post date:** [October 31, 2023, 10:02am UTC](https://forum.fuel.network/t/typeerror-cannot-read-the-properties-of-undefined-reading-programtype/3410/3 "2023-10-31T10:02:00Z")

</div>

![20231027_150120](https://us1.discourse-cdn.com/flex022/uploads/fuel/original/2X/7/7fecd9bed070ff96f1b87a1c537f8a81c7e4dfd2.jpeg)

---

<div class="post-metadata">

**Author:** ![sandusky](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/sandusky/32/1313_2.png) [@sandusky](https://forum.fuel.network/u/sandusky)\
**Post date:** [October 31, 2023, 3:28pm UTC](https://forum.fuel.network/t/typeerror-cannot-read-the-properties-of-undefined-reading-programtype/3410/4 "2023-10-31T15:28:04Z")

</div>

Hi there, @alarimoore

Can you please share the output of “fuelup show”

Please copy and paste since its easier to read than the actual picture.

Thanks! 🌴

---

<div class="post-metadata">

**Author:** ![alarimoore](https://avatars.discourse-cdn.com/v4/letter/a/7c8e57/32.png) [@alarimoore](https://forum.fuel.network/u/alarimoore)\
**Post date:** [November 1, 2023, 9:26am UTC](https://forum.fuel.network/t/typeerror-cannot-read-the-properties-of-undefined-reading-programtype/3410/5 "2023-11-01T09:26:40Z")

</div>

{  
“compilerOptions”: {  
“types”: [“@fuel-wallet/sdk”],  
“target”: “es5”,  
“lib”: [  
“dom”,  
“dom.iterable”,  
“esnext”  
],  
“allowJs”: true,  
“skipLibCheck”: true,  
“esModuleInterop”: true,  
“allowSyntheticDefaultImports”: true,  
“strict”: true,  
“forceConsistentCasingInFileNames”: true,  
“noFallthroughCasesInSwitch”: true,  
“module”: “esnext”,  
“moduleResolution”: “node”,  
“resolveJsonModule”: true,  
“isolatedModules”: true,  
“noEmit”: true,  
“jsx”: “react-jsx”  
},  
“include”: [  
“src”  
]  
}

---

<div class="post-metadata">

**Author:** ![sandusky](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/sandusky/32/1313_2.png) [@sandusky](https://forum.fuel.network/u/sandusky)\
**Post date:** [November 1, 2023, 7:37pm UTC](https://forum.fuel.network/t/typeerror-cannot-read-the-properties-of-undefined-reading-programtype/3410/6 "2023-11-01T19:37:23Z")

</div>

Hi @alarimoore

That’s your tsconfig file, which contains the configuration for the typescript compiler.

However, in this case, we require the information of your toolchain. The reason for this is for us to know which version of the sway compiler is being used to generate your contract’s abi.

To get the information of your current toolchain:

1. please open a new terminal
2. write the following prompt

```auto
fuelup show

```

1. copy and paste the result as a new comment.

Let me know if that works for you!  
🌴

---

<div class="post-metadata">

**Author:** ![alarimoore](https://avatars.discourse-cdn.com/v4/letter/a/7c8e57/32.png) [@alarimoore](https://forum.fuel.network/u/alarimoore)\
**Post date:** [November 2, 2023, 7:58am UTC](https://forum.fuel.network/t/typeerror-cannot-read-the-properties-of-undefined-reading-programtype/3410/7 "2023-11-02T07:58:03Z")

</div>

Thank you, I will do that.

---

<div class="post-metadata">

**Author:** ![alarimoore](https://avatars.discourse-cdn.com/v4/letter/a/7c8e57/32.png) [@alarimoore](https://forum.fuel.network/u/alarimoore)\
**Post date:** [November 2, 2023, 1:32pm UTC](https://forum.fuel.network/t/typeerror-cannot-read-the-properties-of-undefined-reading-programtype/3410/8 "2023-11-02T13:32:29Z")

</div>

Default host: x86\_64-unknown-linux-gnu  
fuelup home: /home/alarimoore/.fuelup

installed toolchains

---

<div class="post-metadata">

**Author:** ![alarimoore](https://avatars.discourse-cdn.com/v4/letter/a/7c8e57/32.png) [@alarimoore](https://forum.fuel.network/u/alarimoore)\
**Post date:** [November 7, 2023, 11:35am UTC](https://forum.fuel.network/t/typeerror-cannot-read-the-properties-of-undefined-reading-programtype/3410/9 "2023-11-07T11:35:29Z")

</div>

Hello sir,  
Good day.  
I was waiting for your response to my above message.

---

<div class="post-metadata">

**Author:** ![sandusky](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/sandusky/32/1313_2.png) [@sandusky](https://forum.fuel.network/u/sandusky)\
**Post date:** [November 7, 2023, 3:36pm UTC](https://forum.fuel.network/t/typeerror-cannot-read-the-properties-of-undefined-reading-programtype/3410/10 "2023-11-07T15:36:50Z")

</div>

Hi there!

The information required is under “installed toolchains” and should look something like this.

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

installed toolchains
--------------------
latest-x86_64-unknown-linux-gnu
beta-4-x86_64-unknown-linux-gnu (default)

active toolchain
-----------------
beta-4-x86_64-unknown-linux-gnu (default)
  forc : 0.46.1
    - forc-client
      - forc-deploy : 0.46.1
      - forc-run : 0.46.1
    - forc-doc : 0.46.1
    - forc-explore : 0.28.1
    - forc-fmt : 0.46.1
    - forc-index : 0.23.0
    - forc-lsp : 0.46.1
    - forc-tx : 0.46.1
    - forc-wallet : 0.3.0
  fuel-core : 0.20.5
  fuel-core-keygen : Error getting version string
  fuel-indexer : 0.23.0

fuels versions
---------------
forc : 0.45
forc-wallet : 0.45

```
