# I can't find and edit the javascript file of a module (Home assistant)

**URL:** <https://discourse.nodered.org/t/i-cant-find-and-edit-the-javascript-file-of-a-module-home-assistant/69315>\
**Category:** General\
**Tags:** home-assistant\
**Created:** [20 October 2022 08:27 UTC](https://discourse.nodered.org/t/i-cant-find-and-edit-the-javascript-file-of-a-module-home-assistant/69315 "2022-10-20T08:27:21Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Giacomo23](https://avatars.discourse-cdn.com/v4/letter/g/85e7bf/32.png) [@Giacomo23](https://discourse.nodered.org/u/Giacomo23)\
**Post date:** [20 October 2022 08:27 UTC](https://discourse.nodered.org/t/i-cant-find-and-edit-the-javascript-file-of-a-module-home-assistant/69315/1 "2022-10-20T08:27:21Z")

</div>

Hi, I have the same problem as this github ([https://github.com/Hypnos3/node-red-contrib-cast/issues/73](https://github.com/Hypnos3/node-red-contrib-cast/issues/73)  
) and it says that to solve I have to modify the javascript file inside the module, only when I go to the node\_modules folder I do not find the add-on and therefore not even the javascript file

 ![Cattura](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/2/c2711f9f9a3b780916d8586b278e8e770c9acbab.png)  
 ![HA](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/6/b6b338fd41eb8c8a5f674201da6f06a87ef9b7ef.png)

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [20 October 2022 11:26 UTC](https://discourse.nodered.org/t/i-cant-find-and-edit-the-javascript-file-of-a-module-home-assistant/69315/2 "2022-10-20T11:26:57Z")

</div>

Since you didn't let us know what device/OS you are using, I will provide an answer that would apply if ou were tunning on a raspberry pi using Buster.  
ssh into the device and enter  
`cd $HOME.node-red/node_modules/node-red-contrib-cast`  
and that will put in the folder with the nodes code,

---

<div class="post-metadata">

**Author:** ![Giacomo23](https://avatars.discourse-cdn.com/v4/letter/g/85e7bf/32.png) [@Giacomo23](https://discourse.nodered.org/u/Giacomo23)\
**Post date:** [20 October 2022 11:32 UTC](https://discourse.nodered.org/t/i-cant-find-and-edit-the-javascript-file-of-a-module-home-assistant/69315/3 "2022-10-20T11:32:58Z")

</div>

yes you are right sorry, i am using a raspberry pi 3 B +, i installed through SD memory card home assistant ([Link](https://www.home-assistant.io/installation/raspberrypi/)).  
i ran the command on the shell through putty link but it tells me this error:  
 ![Cattura](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/d/dd1cd248b15c2c28cc196520d680cdd6bd4c48f6.png)

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [20 October 2022 11:35 UTC](https://discourse.nodered.org/t/i-cant-find-and-edit-the-javascript-file-of-a-module-home-assistant/69315/4 "2022-10-20T11:35:37Z")

</div>

Ahh you are using Home Assistant, that would have been an important peice of information to have provided.

Not being a Home Assistant user (nor are many others here) you would be best served asking on the Home Assistant forum.

Good Luck!

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [20 October 2022 13:09 UTC](https://discourse.nodered.org/t/i-cant-find-and-edit-the-javascript-file-of-a-module-home-assistant/69315/5 "2022-10-20T13:09:54Z")

</div>

That node was last updated 2 years ago and is no longer maintained.  
There is another node-red-contrib-castv2. No idea if it offers the same functions.

However, the issue you say you have is marked as closed, presumably included in v0.2.17.

> [@zenofmud](#):
>
> cd $HOME.node-red/node\_modules/node-red-contrib-cast

If it were not a Home Assistant installation, that should be  
`cd $HOME/.node-red/node_modules/node-red-contrib-cast`

---

<div class="post-metadata">

**Author:** ![Giacomo23](https://avatars.discourse-cdn.com/v4/letter/g/85e7bf/32.png) [@Giacomo23](https://discourse.nodered.org/u/Giacomo23)\
**Post date:** [20 October 2022 13:46 UTC](https://discourse.nodered.org/t/i-cant-find-and-edit-the-javascript-file-of-a-module-home-assistant/69315/6 "2022-10-20T13:46:46Z")

</div>

and there is no way to change it?

---

<div class="post-metadata">

**Author:** ![Giacomo23](https://avatars.discourse-cdn.com/v4/letter/g/85e7bf/32.png) [@Giacomo23](https://discourse.nodered.org/u/Giacomo23)\
**Post date:** [20 October 2022 13:59 UTC](https://discourse.nodered.org/t/i-cant-find-and-edit-the-javascript-file-of-a-module-home-assistant/69315/7 "2022-10-20T13:59:47Z")

</div>

this javascript must be somewhere else how does it work?

---

<div class="post-metadata">

**Author:** ![Giacomo23](https://avatars.discourse-cdn.com/v4/letter/g/85e7bf/32.png) [@Giacomo23](https://discourse.nodered.org/u/Giacomo23)\
**Post date:** [20 October 2022 14:32 UTC](https://discourse.nodered.org/t/i-cant-find-and-edit-the-javascript-file-of-a-module-home-assistant/69315/8 "2022-10-20T14:32:07Z")

</div>

because my problem is to create an exception when I get this error:

 ![Cattura](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/c/dc12fbcd4adf8a1d247fe7147e4bdb9b7856c84f.png)  
@zenofmud @zenofmud  
thanks for all

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [20 October 2022 15:34 UTC](https://discourse.nodered.org/t/i-cant-find-and-edit-the-javascript-file-of-a-module-home-assistant/69315/9 "2022-10-20T15:34:26Z")

</div>

You're right, the JavaScript is elsewhere. It is inside of the container (a virtual machine) & typically not accessible because you are using node red from within home assistant.

If Node red were installed outside of home assistant. Then you could access the files.

If you really want to try, you could log into the container and it will be within that directory listed in the GitHub issue.

Alternatively, don't use the home assistant node-red Add-in - instead - install node red locally.

---

<div class="post-metadata">

**Author:** ![Giacomo23](https://avatars.discourse-cdn.com/v4/letter/g/85e7bf/32.png) [@Giacomo23](https://discourse.nodered.org/u/Giacomo23)\
**Post date:** [20 October 2022 15:55 UTC](https://discourse.nodered.org/t/i-cant-find-and-edit-the-javascript-file-of-a-module-home-assistant/69315/10 "2022-10-20T15:55:09Z")

</div>

I could also install pure node red without home assistant the problem is that after I don't know how to integrate this iteration ([link](https://www.youtube.com/watch?v=jNNl-qMUdfo&t=768s&ab_channel=Tristan%27sSmartesHeim))

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [20 October 2022 15:59 UTC](https://discourse.nodered.org/t/i-cant-find-and-edit-the-javascript-file-of-a-module-home-assistant/69315/11 "2022-10-20T15:59:33Z")

</div>

you can use the alexa nodes

e.g. [Search results for 'alexa skills' - Node-RED Forum](https://discourse.nodered.org/search?q=alexa%20skills)

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [20 October 2022 19:23 UTC](https://discourse.nodered.org/t/i-cant-find-and-edit-the-javascript-file-of-a-module-home-assistant/69315/12 "2022-10-20T19:23:20Z")

</div>

> [@Giacomo23](#):
>
> this javascript must be somewhere else how does it work?

I am afraid I have no idea how a Home Assistant machine is set up.  
To find the file on my Raspberry Pi i would run **sudo find / -name cast-to-client.js**.  
But maybe HA has stuff hidden in containers like with Docker.

---

<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:** [19 December 2022 19:23 UTC](https://discourse.nodered.org/t/i-cant-find-and-edit-the-javascript-file-of-a-module-home-assistant/69315/13 "2022-12-19T19:23:57Z")

</div>

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