# Javascript Library in Template Node for Robot Visualization

**URL:** <https://discourse.nodered.org/t/javascript-library-in-template-node-for-robot-visualization/55288>\
**Category:** Dashboard\
**Created:** [16 December 2021 12:47 UTC](https://discourse.nodered.org/t/javascript-library-in-template-node-for-robot-visualization/55288 "2021-12-16T12:47:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vinzenz](https://avatars.discourse-cdn.com/v4/letter/v/898d66/32.png) [@Vinzenz](https://discourse.nodered.org/u/Vinzenz)\
**Post date:** [16 December 2021 12:47 UTC](https://discourse.nodered.org/t/javascript-library-in-template-node-for-robot-visualization/55288/1 "2021-12-16T12:47:51Z")

</div>

Hi together,

currently I am working on a project where I get data from a robot and visualize it in the Dashbaord. For visualization I use an external JS library. I searched through the forum and was able to import the Javascript Library into Node-RED. [Import JavaScript library into node-red](https://discourse.nodered.org/t/import-javascript-library-into-node-red/7665)

So I can access the script in the Browser ([http://localhost:1880/rv-master/src/RobotViewer.js](http://localhost:1880/rv-master/src/RobotViewer.js))

However, I guess I am making a mistake by using the script tag.

 ![Bildschirmfoto 2021-12-16 um 13.45.13](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/c/ec933e06be5c1811abeaf676dfb2ad90e8b814cd.png)

I try to add it to the Head section so that it is being loaded and in another template node I try to access it. However, I get a reference error which says RobotViewer not defined.

What is wrong here?  
[RobotVisualization.json](https://discourse.nodered.org/uploads/short-url/7B45EzmwaTbMSClRrVg7rC6rNzZ.json) (1.9 KB)

 ![Bildschirmfoto 2021-12-16 um 13.46.28](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/5/658ee0ba85aeb69dcbf3b375980cebe13eae3243.png)

 ![Bildschirmfoto 2021-12-16 um 13.24.30](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/b/dba3182bea669b6cdd3aea2a316cddd0c5b10e10.png)

Thats how it should like like in the end:

Thanks for helping.

 ![Bildschirmfoto 2021-12-16 um 13.48.51](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/8/a8cfaf1f671e1a76f81c5da0e42e215f24a19151.png)

---

<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:** [15 January 2022 12:47 UTC](https://discourse.nodered.org/t/javascript-library-in-template-node-for-robot-visualization/55288/2 "2022-01-15T12:47:53Z")

</div>

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