# Javascript library docker problem

**URL:** <https://discourse.nodered.org/t/javascript-library-docker-problem/47018>\
**Category:** General\
**Created:** [11 June 2021 09:36 UTC](https://discourse.nodered.org/t/javascript-library-docker-problem/47018 "2021-06-11T09:36:42Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![pranavthakkar](https://avatars.discourse-cdn.com/v4/letter/p/e99b99/32.png) [@pranavthakkar](https://discourse.nodered.org/u/pranavthakkar)\
**Post date:** [11 June 2021 09:36 UTC](https://discourse.nodered.org/t/javascript-library-docker-problem/47018/1 "2021-06-11T09:36:42Z")

</div>

Hi, I'm at this [stage](https://discourse.nodered.org/t/import-javascript-library-into-node-red/7665/2) . when I was with my local PC I'm able to connect my library successfully.

Now I have docker for that I've also mount the directory and provide path to settings.js

but I'm confused on my **script** tag. should I put localhost there or my hosted server IP??

```auto
<script type="text/javascript" src="http:/locahost:1880/api/t2e/dist/tableToExcel.js"></script>

```

### note **/api/** is enabled by httpadminroot::

also will this gonna work?

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/8/e8f6ccd603caaaefff58beb13a918056f1e69da3.png)

this is the error

---

<div class="post-metadata">

**Author:** ![pranavthakkar](https://avatars.discourse-cdn.com/v4/letter/p/e99b99/32.png) [@pranavthakkar](https://discourse.nodered.org/u/pranavthakkar)\
**Post date:** [12 June 2021 08:24 UTC](https://discourse.nodered.org/t/javascript-library-docker-problem/47018/2 "2021-06-12T08:24:24Z")

</div>

@knolleary Hi Nick!! can you help me on this?

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [12 June 2021 08:40 UTC](https://discourse.nodered.org/t/javascript-library-docker-problem/47018/3 "2021-06-12T08:40:42Z")

</div>

What have you set httpStatic to?

What is the full path/filename of the .js file?

Where are you trying to load this? I'm a node-red Dashboard ui\_template?

What URL do you access the dashboard on?

What URL do you access the NR editor on?

---

<div class="post-metadata">

**Author:** ![pranavthakkar](https://avatars.discourse-cdn.com/v4/letter/p/e99b99/32.png) [@pranavthakkar](https://discourse.nodered.org/u/pranavthakkar)\
**Post date:** [12 June 2021 08:51 UTC](https://discourse.nodered.org/t/javascript-library-docker-problem/47018/4 "2021-06-12T08:51:12Z")

</div>

My directory is /dataNR which is bind to docker container at /fileNR  
in dataNR I've another directory called t2e which have files inside.

1. httpStatic: '/filesNR'

2. fullpath : /filesNR/t2e/dist/tableToExcel.js

3. I want to provide JavaScript file for template node.

4. [http://mydomain.com:1880/dashboard/](http://mydomain.com:1880/dashboard/)

5.[http://mydomain.com:1880/api/](http://mydomain.com:1880/api/)

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [12 June 2021 09:04 UTC](https://discourse.nodered.org/t/javascript-library-docker-problem/47018/5 "2021-06-12T09:04:36Z")

</div>

Then I think you should use `/t2e/dist/tableToExcel.js` as the path in the script tag. No need for the full domain as its served from the same domain as the dashboard.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [26 June 2021 09:04 UTC](https://discourse.nodered.org/t/javascript-library-docker-problem/47018/6 "2021-06-26T09:04:46Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
