# Not able to uninstall module from Palette "unknown module: node-red-contrib-play-audio"

**URL:** <https://discourse.nodered.org/t/not-able-to-uninstall-module-from-palette-unknown-module-node-red-contrib-play-audio/85522>\
**Category:** General\
**Created:** [14 February 2024 08:29 UTC](https://discourse.nodered.org/t/not-able-to-uninstall-module-from-palette-unknown-module-node-red-contrib-play-audio/85522 "2024-02-14T08:29:42Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![FloRu](https://avatars.discourse-cdn.com/v4/letter/f/db5fbb/32.png) [@FloRu](https://discourse.nodered.org/u/FloRu)\
**Post date:** [14 February 2024 08:29 UTC](https://discourse.nodered.org/t/not-able-to-uninstall-module-from-palette-unknown-module-node-red-contrib-play-audio/85522/1 "2024-02-14T08:29:42Z")

</div>

Hi there!

I please need some advise on how to get a module uninstalled, if - in my case - the palette manager says "Failed to remove: node-red-contrib-play-audio / unknown module: node-red-contrib-play-audio".

The log only tells

> 2024-02-14T08:25:38.862Z Remove : node-red-contrib-play-audio

...and nothing else...

In the meantime I (think, I) uninstalled the module via npm, but node-red continues to show the module in the palette.  
Can anyone help me out?

Thanks!  
Florian

---

<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:** [14 February 2024 09:46 UTC](https://discourse.nodered.org/t/not-able-to-uninstall-module-from-palette-unknown-module-node-red-contrib-play-audio/85522/2 "2024-02-14T09:46:05Z")

</div>

Assuming that you have a conventional install of node-red then go into your .node-red folder and run  
`npm remove node-red-contrib-play-audio`  
Copy/paste the full output please, including the line where you typed the command.  
Then restart node-red and see if it is still there.

---

<div class="post-metadata">

**Author:** ![FloRu](https://avatars.discourse-cdn.com/v4/letter/f/db5fbb/32.png) [@FloRu](https://discourse.nodered.org/u/FloRu)\
**Post date:** [15 February 2024 07:51 UTC](https://discourse.nodered.org/t/not-able-to-uninstall-module-from-palette-unknown-module-node-red-contrib-play-audio/85522/3 "2024-02-15T07:51:46Z")

</div>

Hi Colin,

it's an install on a Raspi running DietPi (Debian / Raspbian) where the installation is sitting at /mnt/dietpi\_userdata/node-red/

Here's the output:

```auto
dietpi@bookworm:/mnt/dietpi_userdata/node-red$ npm remove node-red-contrib-play-audio
npm ERR! code EACCES
npm ERR! syscall mkdir
npm ERR! path /mnt/dietpi_userdata/node-red/node_modules/fsevents
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, mkdir '/mnt/dietpi_userdata/node-red/node_modules/fsevents'
npm ERR! at async mkdir (node:internal/fs/promises:855:10)
npm ERR! at async /usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:551:20
npm ERR! at async Promise.allSettled (index 0)
npm ERR! at async [reifyPackages] (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:251:11)
npm ERR! at async Arborist.reify (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:170:5)
npm ERR! at async Uninstall.exec (/usr/local/lib/node_modules/npm/lib/commands/uninstall.js:52:5)
npm ERR! at async module.exports (/usr/local/lib/node_modules/npm/lib/cli-entry.js:61:5)
npm ERR! Error: EACCES: permission denied, mkdir '/mnt/dietpi_userdata/node-red/node_modules/fsevents'
npm ERR! at async mkdir (node:internal/fs/promises:855:10)
npm ERR! at async /usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:551:20
npm ERR! at async Promise.allSettled (index 0)
npm ERR! at async [reifyPackages] (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:251:11)
npm ERR! at async Arborist.reify (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:170:5)
npm ERR! at async Uninstall.exec (/usr/local/lib/node_modules/npm/lib/commands/uninstall.js:52:5)
npm ERR! at async module.exports (/usr/local/lib/node_modules/npm/lib/cli-entry.js:61:5) {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'mkdir',
npm ERR! path: '/mnt/dietpi_userdata/node-red/node_modules/fsevents'
npm ERR! }
npm ERR! 
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR! 
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in: /home/dietpi/.npm/_logs/2024-02-15T07_42_52_701Z-debug-0.log
dietpi@bookworm:/mnt/dietpi_userdata/node-red$

```

I then tried it again with sudo:

```auto
dietpi@bookworm:/mnt/dietpi_userdata/node-red$ sudo npm remove node-red-contrib-play-audio

up to date, audited 1486 packages in 18s

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

24 vulnerabilities (16 moderate, 8 high)

To address issues that do not require attention, run:
  npm audit fix

To address all issues possible (including breaking changes), run:
  npm audit fix --force

Some issues need review, and may require choosing
a different dependency.

Run `npm audit` for details.
dietpi@bookworm:/mnt/dietpi_userdata/node-red$ sudo systemctl restart node-red.service

```

...and it is still there... ☹

---

<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:** [15 February 2024 08:17 UTC](https://discourse.nodered.org/t/not-able-to-uninstall-module-from-palette-unknown-module-node-red-contrib-play-audio/85522/4 "2024-02-15T08:17:30Z")

</div>

Contrib nodes are typically not installed in the installation directory. They are normally installed in the user directory. The node-red user directory by looking at The startup log. Typically though it is `~/.node-red`

Try

```auto
cd ~/.node-red
npm remove node-red-contrib-play-audio

```

Also, in case you installed it globally do this too

```auto
sudo npm remove -g node-red-contrib-play-audio

```

---

<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:** [15 February 2024 08:20 UTC](https://discourse.nodered.org/t/not-able-to-uninstall-module-from-palette-unknown-module-node-red-contrib-play-audio/85522/5 "2024-02-15T08:20:51Z")

</div>

> [@FloRu](#):
>
> `/mnt/dietpi_userdata/node-red$`

Is that the folder where your node red flows file is?

---

<div class="post-metadata">

**Author:** ![FloRu](https://avatars.discourse-cdn.com/v4/letter/f/db5fbb/32.png) [@FloRu](https://discourse.nodered.org/u/FloRu)\
**Post date:** [15 February 2024 09:08 UTC](https://discourse.nodered.org/t/not-able-to-uninstall-module-from-palette-unknown-module-node-red-contrib-play-audio/85522/6 "2024-02-15T09:08:43Z")

</div>

Yes. And there it is inside the projects/projectname subfolder.  
That's where I get it installed via dietpi-software...

---

<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:** [15 February 2024 09:25 UTC](https://discourse.nodered.org/t/not-able-to-uninstall-module-from-palette-unknown-module-node-red-contrib-play-audio/85522/7 "2024-02-15T09:25:03Z")

</div>

Can you show us the output in the command window when you stop and restart node red please. It should start with Welcome to node red.

---

<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:** [15 February 2024 09:35 UTC](https://discourse.nodered.org/t/not-able-to-uninstall-module-from-palette-unknown-module-node-red-contrib-play-audio/85522/8 "2024-02-15T09:35:40Z")

</div>

I assume that you did not install node-red using the recommended method for diet-pi. [Running on Raspberry Pi : Node-RED](https://nodered.org/docs/getting-started/raspberrypi)

---

<div class="post-metadata">

**Author:** ![FloRu](https://avatars.discourse-cdn.com/v4/letter/f/db5fbb/32.png) [@FloRu](https://discourse.nodered.org/u/FloRu)\
**Post date:** [15 February 2024 10:17 UTC](https://discourse.nodered.org/t/not-able-to-uninstall-module-from-palette-unknown-module-node-red-contrib-play-audio/85522/9 "2024-02-15T10:17:56Z")

</div>

Here you are...

```auto
Feb 15 11:16:18 bookworm node-red[18685]: Willkommen bei Node-RED
Feb 15 11:16:18 bookworm node-red[18685]: ===================
Feb 15 11:16:18 bookworm node-red[18685]: 15 Feb 11:16:18 - [info] Node-RED Version: v3.1.3
Feb 15 11:16:18 bookworm node-red[18685]: 15 Feb 11:16:18 - [info] Node.js Version: v21.6.1
Feb 15 11:16:18 bookworm node-red[18685]: 15 Feb 11:16:18 - [info] Linux 6.1.21-v8+ arm64 LE
Feb 15 11:16:19 bookworm node-red[18685]: 15 Feb 11:16:19 - [info] Paletten-Nodes werden geladen
Feb 15 11:16:22 bookworm node-red[18685]: 15 Feb 11:16:22 - [info] Dashboard version 3.6.2 started at /UI-22-SEMD
Feb 15 11:16:23 bookworm node-red[18685]: (node:18685) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
Feb 15 11:16:23 bookworm node-red[18685]: (Use `node --trace-deprecation ...` to show where the warning was created)
Feb 15 11:16:23 bookworm node-red[18685]: 15 Feb 11:16:23 - [info] Einstellungsdatei: /mnt/dietpi_userdata/node-red/settings.js
Feb 15 11:16:23 bookworm node-red[18685]: 15 Feb 11:16:23 - [info] Kontextspeicher: default [module=memory]
Feb 15 11:16:23 bookworm node-red[18685]: 15 Feb 11:16:23 - [info] Benutzerverzeichnis: /mnt/dietpi_userdata/node-red
Feb 15 11:16:23 bookworm node-red[18685]: 15 Feb 11:16:23 - [info] Projektverzeichnis: /mnt/dietpi_userdata/node-red/projects
Feb 15 11:16:23 bookworm node-red[18685]: 15 Feb 11:16:23 - [info] Server wird jetzt auf https://127.0.0.1:1880/Admin/ ausgeführt
Feb 15 11:16:23 bookworm node-red[18685]: 15 Feb 11:16:23 - [info] Aktives Projekt: gema
Feb 15 11:16:23 bookworm node-red[18685]: 15 Feb 11:16:23 - [info] Flow-Datei: /mnt/dietpi_userdata/node-red/projects/gema/flows.json
Feb 15 11:16:23 bookworm node-red[18685]: 15 Feb 11:16:23 - [warn] Verschlüsselte Credentials nicht gefunden
Feb 15 11:16:23 bookworm node-red[18685]: 15 Feb 11:16:23 - [info] Flows werden gestartet
Feb 15 11:16:23 bookworm node-red[18685]: 15 Feb 11:16:23 - [info] Flows sind gestartet

```

---

<div class="post-metadata">

**Author:** ![FloRu](https://avatars.discourse-cdn.com/v4/letter/f/db5fbb/32.png) [@FloRu](https://discourse.nodered.org/u/FloRu)\
**Post date:** [15 February 2024 10:21 UTC](https://discourse.nodered.org/t/not-able-to-uninstall-module-from-palette-unknown-module-node-red-contrib-play-audio/85522/10 "2024-02-15T10:21:57Z")

</div>

Yes, that's true.

It isn't possible to run this script on dietpi since the system recognizes the platform and tells me to use "dietpi-software" and stops.

dietpi-software manages the installation process itself.

That's also the reason why the platform is running node v21.6.1 and not the recommended version... but it's the distribution that - in my opinion - is running best for my purposes. It is a nice and lean distribution.

---

<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:** [15 February 2024 16:37 UTC](https://discourse.nodered.org/t/not-able-to-uninstall-module-from-palette-unknown-module-node-red-contrib-play-audio/85522/11 "2024-02-15T16:37:38Z")

</div>

> [@FloRu](#):
>
> It isn't possible to run this script on dietpi since the system recognizes the platform and tells me to use "dietpi-software" and stops.

That is odd, as it says on [that page](https://nodered.org/docs/getting-started/raspberrypi) that it is suitable for diet-pi. Perhaps the doc is out of date.

Go into

> [@FloRu](#):
>
> ```auto
> npm ERR! Error: EACCES: permission denied, mkdir '/mnt/dietpi_userdata/node-red/node_modules/fsevents'
> 
> ```

That means that the user dietpi has not got full write permissions into the node\_modules folder, possibly because you used sudo to install a node at some point. Probably there are some root owned folders or files there. I suggest you ensure that all files and folders in dietpi\_userdata are owned by dietpi and try again.

---

<div class="post-metadata">

**Author:** ![FloRu](https://avatars.discourse-cdn.com/v4/letter/f/db5fbb/32.png) [@FloRu](https://discourse.nodered.org/u/FloRu)\
**Post date:** [15 February 2024 22:45 UTC](https://discourse.nodered.org/t/not-able-to-uninstall-module-from-palette-unknown-module-node-red-contrib-play-audio/85522/12 "2024-02-15T22:45:27Z")

</div>

> [@Colin](#):
>
> That is odd, as it says on [that page](https://nodered.org/docs/getting-started/raspberrypi) that it is suitable for diet-pi. Perhaps the doc is out of date

I am not sure, but maybe last time I only tried the script once, and it stopped. I didn't try to install it via apt-get... Think I have to give it a second chance...

> [@Colin](#):
>
> That means that the user dietpi has not got full write permissions into the node\_modules folder, possibly because you used sudo to install a node at some point. Probably there are some root owned folders or files there. I suggest you ensure that all files and folders in dietpi\_userdata are owned by dietpi and try again.

Okay - I will try to ensure the correct ownership and try again. Thanks for that hint.

---

<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 May 2024 22:46 UTC](https://discourse.nodered.org/t/not-able-to-uninstall-module-from-palette-unknown-module-node-red-contrib-play-audio/85522/13 "2024-05-15T22:46:10Z")

</div>

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