# Getting started with a pxt extension for micro:bit

**URL:** https://forum.makecode.com/t/getting-started-with-a-pxt-extension-for-micro-bit/4353
**Category:** PXT
**Created:** [November 10, 2020, 1:54am UTC](https://forum.makecode.com/t/getting-started-with-a-pxt-extension-for-micro-bit/4353 "2020-11-10T01:54:22Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![tncbbthositg](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/tncbbthositg/32/2288_2.png) [@tncbbthositg](https://forum.makecode.com/u/tncbbthositg)
#### Post date: [November 10, 2020, 1:54am UTC](https://forum.makecode.com/t/getting-started-with-a-pxt-extension-for-micro-bit/4353/1 "2020-11-10T01:54:22Z")

</div>

I’ve read through a lot of documentation regarding creating PXT extensions. I need to put one together for a third party micro:bit accessory I bought for my kids.

I was following along trying to get PXT to let me pick a target, but it fails to install pxt-microbit. I get a JSON parsing error:

```auto
Unexpected end of JSON input while parsing near '...6.4.12","dependencies'

```

In the error log, there are more details:

> 18 silly fetchPackageMetaData error for pxt-common-packages@8.3.1 Unexpected end of JSON input while parsing near ‘…6.4.12","dependencies’

Has anyone been able to get the PXT CLI to work lately?

Thanks!!

---

<div class="post-metadata">

### Author: ![livcheerful](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/livcheerful/32/3509_2.png) [@livcheerful](https://forum.makecode.com/u/livcheerful)
#### Post date: [November 10, 2020, 6:04pm UTC](https://forum.makecode.com/t/getting-started-with-a-pxt-extension-for-micro-bit/4353/2 "2020-11-10T18:04:53Z")

</div>

oh interesting. What command did you run when you got your error?

---

<div class="post-metadata">

### Author: ![tncbbthositg](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/tncbbthositg/32/2288_2.png) [@tncbbthositg](https://forum.makecode.com/u/tncbbthositg)
#### Post date: [November 10, 2020, 7:17pm UTC](https://forum.makecode.com/t/getting-started-with-a-pxt-extension-for-micro-bit/4353/3 "2020-11-10T19:17:26Z")

</div>

I’ve moved on to doing everything semi-manually just to get through it. I believe the command was:

```auto
pxt target microbit

```

I also tried, `npm install pxt-common-packages` and got the same error. I think I tried something like `npm install pxt-microbit` and got a different JSON parsing error. I got these packages out of the error logs so I can’t recall exactly.

So far, doing it manually is not so bad. It would be nice if I could at least get some typedefs from pxt-microbit and pxt-neopixel though.
