# Error message with extension

**URL:** https://forum.makecode.com/t/error-message-with-extension/38795
**Category:** micro:bit extensions
**Tags:** extension
**Created:** [August 20, 2025, 6:47pm UTC](https://forum.makecode.com/t/error-message-with-extension/38795 "2025-08-20T18:47:16Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Zauberhut](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/zauberhut/32/8458_2.png) [@Zauberhut](https://forum.makecode.com/u/Zauberhut)
#### Post date: [August 20, 2025, 6:47pm UTC](https://forum.makecode.com/t/error-message-with-extension/38795/1 "2025-08-20T18:47:16Z")

</div>

We designed the extesion [https://github.com/mint-n-pepper/Informatiktheater](https://github.com/mint-n-pepper/Informatiktheater) But sinde e few weeks, we get the error message “  
TypeError: Expected type string but received type undefined. Did you forget to assign a variable?” when we import it. What happened with the compiler? What can we do?

Could anyone help?

---

<div class="post-metadata">

### Author: ![NeverStopTheCoder](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/neverstopthecoder/32/21194_2.png) [@NeverStopTheCoder](https://forum.makecode.com/u/NeverStopTheCoder)
#### Post date: [August 21, 2025, 2:36am UTC](https://forum.makecode.com/t/error-message-with-extension/38795/2 "2025-08-21T02:36:08Z")

</div>

![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/6/0/603534afc539daff4e9878aac137e29bb17a5cb0.png)this is what I can see and I don’t know if I can help with the 63 errors but the 2 errors are in the main.ts and I am pretty sure that at least for the extensions I’ve made you should not have anything in the main.ts because if I’m not mistaken the main.ts is what is in the JavaScript or blocks in the project you made the extension in and if you leave that in it can interfere with the project that you download the extension into so just remove whats in the main.ts and that I think should remove the 2 errors but take that as you will because I’m not a professorial

---

<div class="post-metadata">

### Author: ![NeverStopTheCoder](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/neverstopthecoder/32/21194_2.png) [@NeverStopTheCoder](https://forum.makecode.com/u/NeverStopTheCoder)
#### Post date: [August 21, 2025, 2:36am UTC](https://forum.makecode.com/t/error-message-with-extension/38795/3 "2025-08-21T02:36:27Z")

</div>

also if you have a extension in the project you made your extension in when people download your extension that extension will be added with it as well so looking at your extension it looks like its something to do with hardware and it might need a hardware extension with it

---

<div class="post-metadata">

### Author: ![Don](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/don/32/17989_2.png) [@Don](https://forum.makecode.com/u/Don)
#### Post date: [August 21, 2025, 4:32pm UTC](https://forum.makecode.com/t/error-message-with-extension/38795/4 "2025-08-21T16:32:01Z")

</div>

The first thing you do is call startbit\_Init and that calls getHandleCmd.

getHandleCmd reads a string from serial:

```javascript
  function getHandleCmd() {
    let charStr: string = serial.readString();
    handleCmd = handleCmd.concat(charStr);

```

I am thinking that serial is not ready for that so you get undefined.
