# Typescript error while building custom node

**URL:** <https://community.n8n.io/t/typescript-error-while-building-custom-node/1781>\
**Category:** Questions\
**Created:** [July 14, 2020, 2:28am UTC](https://community.n8n.io/t/typescript-error-while-building-custom-node/1781 "2020-07-14T02:28:51Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![kumar](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/kumar/32/1417_2.png) [@kumar](https://community.n8n.io/u/kumar)\
**Post date:** [July 14, 2020, 2:28am UTC](https://community.n8n.io/t/typescript-error-while-building-custom-node/1781/1 "2020-07-14T02:28:51Z")

</div>

Hello good folks of n8n, I have an issue that you might be able to help me with

I am following [the instructions to create a custom node](https://docs.n8n.io/#/create-node?id=create-the-first-basic-node) so I could use the ‘http’ module in my functions. I keep on getting the error `error TS1003: Identifier expected.` when i try to build it.

My custom node code is the default code plus this line after the import statements  
`import * as http from 'http'` . Here’s the complete code for your reference [custom n8n node · GitHub](https://gist.github.com/sauravtom/4c47e13102a3e1a5f5cc349092afe939)

It seems to be a typescript specific error but despite searching online i am unable to fix this, any help regarding this would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![jan](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jan/32/9_2.png) [@jan](https://community.n8n.io/u/jan)\
**Post date:** [July 14, 2020, 10:03am UTC](https://community.n8n.io/t/typescript-error-while-building-custom-node/1781/2 "2020-07-14T10:03:35Z")

</div>

If I try to build that node I get the following error message:

```bash
SauravCustomNode.node.ts(3,20): error TS1003: Identifier expected.

```

Looking at the code it seems like there are two commas in the 3rd line and probably causes the problem you are facing:

 ![Screenshot from 2020-07-14 12-01-19](https://europe1.discourse-cdn.com/n8n/original/2X/7/788fe047f26eee90b902793df19e4ebeb7ed8bb9.png)

Hope that helps!

---

<div class="post-metadata">

**Author:** ![kumar](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/kumar/32/1417_2.png) [@kumar](https://community.n8n.io/u/kumar)\
**Post date:** [July 14, 2020, 11:39am UTC](https://community.n8n.io/t/typescript-error-while-building-custom-node/1781/3 "2020-07-14T11:39:31Z")

</div>

Lol my sleep deprived brain missed that last night.

Thanks for the pointer, I am able to successfully build the project but I have another question.  
After building the node i restarted n8n by `sudo docker-compose stop` and then `sudo docker-compose up -d`

on the website when I try to access my custom node I am unable to find it.

 ![Screen Shot 2020-07-14 at 5.06.01 PM](https://europe1.discourse-cdn.com/n8n/original/2X/3/302f407cc7c775ba0963d70dca4adf8453c92ba5.png)

---

<div class="post-metadata">

**Author:** ![jan](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jan/32/9_2.png) [@jan](https://community.n8n.io/u/jan)\
**Post date:** [July 14, 2020, 12:21pm UTC](https://community.n8n.io/t/typescript-error-while-building-custom-node/1781/4 "2020-07-14T12:21:10Z")

</div>

Two things that could be wrong here:

1. You are looking for the wrong name. You called the node actually “Saurav Custom Node”
2. The `.n8n` folder you build the node into is different to the one your docker container is using

---

<div class="post-metadata">

**Author:** ![kumar](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/kumar/32/1417_2.png) [@kumar](https://community.n8n.io/u/kumar)\
**Post date:** [July 15, 2020, 9:48am UTC](https://community.n8n.io/t/typescript-error-while-building-custom-node/1781/5 "2020-07-15T09:48:44Z")

</div>

According to my `docker-compose.yml` file the n8n volumes folder is `/root/.n8n` and my custom node files are already present in the folder, but still the custom node doesn’t show up on the vue app UI.

 ![Screen Shot 2020-07-15 at 3.16.05 PM](https://europe1.discourse-cdn.com/n8n/original/2X/0/0fbcc7cb6549a94cadfc69b0ebcc39fd0ac77a75.jpeg)

---

<div class="post-metadata">

**Author:** ![jan](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jan/32/9_2.png) [@jan](https://community.n8n.io/u/jan)\
**Post date:** [July 15, 2020, 10:05am UTC](https://community.n8n.io/t/typescript-error-while-building-custom-node/1781/6 "2020-07-15T10:05:12Z")

</div>

`/root/.n8n` is where it does get mounted into the docker-container. So if you want that your local `/root/.n8n` is the same as the `/root/.n8n` in your docker container you would have to change that line to:

```nohighlight
      - /root/.n8n:/root/.n8n

```

But be aware that if you do that, you should first copy the `.n8n` folder from wherever `${DATA_FOLDER}` points to and copy it to `/root/.n8n` because else it will not display you the existing workflows anymore (as in this folder is also the SQLite database).

---

<div class="post-metadata">

**Author:** ![kumar](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/kumar/32/1417_2.png) [@kumar](https://community.n8n.io/u/kumar)\
**Post date:** [July 17, 2020, 6:26am UTC](https://community.n8n.io/t/typescript-error-while-building-custom-node/1781/7 "2020-07-17T06:26:28Z")

</div>

Thanks it’s working now
