# Cast : failed to install

**URL:** <https://discourse.nodered.org/t/cast-failed-to-install/21148>\
**Category:** General\
**Created:** [1 February 2020 16:40 UTC](https://discourse.nodered.org/t/cast-failed-to-install/21148 "2020-02-01T16:40:17Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![DidierWindey](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@DidierWindey](https://discourse.nodered.org/u/DidierWindey)\
**Post date:** [1 February 2020 16:40 UTC](https://discourse.nodered.org/t/cast-failed-to-install/21148/1 "2020-02-01T16:40:17Z")

</div>

I am trying to install node-red-contrib-cast, but I get the message 'failed to install'.  
Nodered is running on a Raspberry pi 2. So far I had no problems with other installs.  
I did already run an update and upgrade.

Any idea how to fix ?

Didier

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [1 February 2020 16:54 UTC](https://discourse.nodered.org/t/cast-failed-to-install/21148/2 "2020-02-01T16:54:21Z")

</div>

In a terminal change to the `.node-red` directory and run  
`npm install node-red-contrib-cast`  
and copy/paste the full result here. Preferably copy/paste rather than screenshot if possible.  
Also tell us which version of node-red and nodejs you are using (`node -v` for the latter) and how you installed node-red.

---

<div class="post-metadata">

**Author:** ![DidierWindey](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@DidierWindey](https://discourse.nodered.org/u/DidierWindey)\
**Post date:** [1 February 2020 17:14 UTC](https://discourse.nodered.org/t/cast-failed-to-install/21148/3 "2020-02-01T17:14:34Z")

</div>

> [@Colin](#):
>
> `npm install node-red-contrib-cast`

here is the result

pi@theone ~ $ npm install node-red-contrib-cast  
npm WARN saveError ENOENT: no such file or directory, open '/home/pi/package.json'  
npm WARN enoent ENOENT: no such file or directory, open '/home/pi/package.json'  
npm WARN pi No description  
npm WARN pi No repository field.  
npm WARN pi No README data  
npm WARN pi No license field.

- node-red-contrib-cast@0.2.13  
updated 1 package and audited 395 packages in 7.476s

14 packages are looking for funding  
run `npm fund` for details

found 0 vulnerabilities

pi@theone ~ $

and here the version

pi@theone ~ $ node -v  
v10.18.1

I guess I installed node-red as root

kind regards

Didier

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [1 February 2020 17:18 UTC](https://discourse.nodered.org/t/cast-failed-to-install/21148/4 "2020-02-01T17:18:26Z")

</div>

> [@Colin](#):
>
> In a terminal change to the `.node-red` directory and run

I don't think you did the first part of that.

When I asked how you installed node red I meant what you did in order to install it. The recommended way of installing for a Pi is  
[https://nodered.org/docs/getting-started/raspberrypi](https://nodered.org/docs/getting-started/raspberrypi)  
If you didn't do that then it might be best to run the script there before doing anything else, then you can be confident you have a consistent set of tools.

---

<div class="post-metadata">

**Author:** ![DidierWindey](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@DidierWindey](https://discourse.nodered.org/u/DidierWindey)\
**Post date:** [1 February 2020 19:32 UTC](https://discourse.nodered.org/t/cast-failed-to-install/21148/5 "2020-02-01T19:32:52Z")

</div>

> [@Colin](#):
>
> `npm install node-red-contrib-cast`

Solved !

1. the Original install was located in root. Ater a full re-intall of node-red it is now in located in home/pi
2. I was not able to intall cast from palette. Eventually did it in the raspberry pi console. A clear error came out \> not the right permissions… installed it as root. works fine now.

thanks

Didier

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [1 February 2020 21:37 UTC](https://discourse.nodered.org/t/cast-failed-to-install/21148/6 "2020-02-01T21:37:51Z")

</div>

> [@DidierWindey](#):
>
> A clear error came out \> not the right permissions

Once again you have failed to tell us the exact error, so we can only guess as to the exact cause, but a permissions error installing a node often means you have files in your home folder that are owned by root, which can happen if you install nodes locally using sudo. The solution is to change the ownership of all files in the .node-red folder to the correct user.

---

<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:** [1 April 2020 21:37 UTC](https://discourse.nodered.org/t/cast-failed-to-install/21148/7 "2020-04-01T21:37:54Z")

</div>

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