# Building a POC in JS

**URL:** <https://forum.social.plus/t/building-a-poc-in-js/748>\
**Category:** Web\
**Created:** [May 24, 2023, 6:51pm UTC](https://forum.social.plus/t/building-a-poc-in-js/748 "2023-05-24T18:51:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dmadorno](https://avatars.discourse-cdn.com/v4/letter/d/b5ac83/32.png) [@dmadorno](https://forum.social.plus/u/dmadorno)\
**Post date:** [May 24, 2023, 6:51pm UTC](https://forum.social.plus/t/building-a-poc-in-js/748/1 "2023-05-24T18:51:24Z")

</div>

Just started working on building a Proof of Concept for my application. We want to use Amity to implement conversations between users on our site.

I started by just trying to run the client code provided and installing the sdk via npm and create a user like so

import AmityClient, { ApiRegion } from “@amityco/js-sdk”;

```
const client = new AmityClient({
  apiKey: "b0e8ee0f3edfa53019308914545b148a855f8fe6e9616b7a",
  apiRegion: ApiRegion.US,
})

```

client.registerSession(1, “Drew”)

But I’m receiving SyntaxError: Named export ‘ApiRegion’ not found. The requested module ‘@amityco/js-sdk’ is a CommonJS module, which may not support all module.exports as named exports.

I tried to switch the imports a bit like this instead

import AmityClient from “@amityco/js-sdk”;  
const { ApiRegion } = AmityClient

But it is still giving me an error  
TypeError: AmityClient is not a constructor

Any help so I can get started would be greatly appreciated. I was under the impression that I could implement this with just vanilla js.

---

<div class="post-metadata">

**Author:** ![cijin](https://avatars.discourse-cdn.com/v4/letter/c/49beb7/32.png) [@cijin](https://forum.social.plus/u/cijin)\
**Post date:** [May 25, 2023, 4:57am UTC](https://forum.social.plus/t/building-a-poc-in-js/748/2 "2023-05-25T04:57:13Z")

</div>

Hey @dmadorno,

If you are just starting out I would recommend you try the Typescript SDK instead.

You can find it [here](https://www.npmjs.com/package/@amityco/ts-sdk)  
Let me know if you have any challenges with implementing the SDK, happy to help.

As for the issue with the JS-SDK, could I know which version you are using. I’ve tried it running locally and seems to be working fine. Could you check if this works?

```auto
import * as Amity from '@amityco/js-sdk'

const { ApiRegion } = Amity;

```

Cijin
