# Renaming the configuration node type (config) in a custom node. Best practice?

**URL:** <https://discourse.nodered.org/t/renaming-the-configuration-node-type-config-in-a-custom-node-best-practice/60041>\
**Category:** Developing Nodes\
**Created:** [18 March 2022 15:53 UTC](https://discourse.nodered.org/t/renaming-the-configuration-node-type-config-in-a-custom-node-best-practice/60041 "2022-03-18T15:53:42Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![hklages](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hklages/32/23899_2.png) [@hklages](https://discourse.nodered.org/u/hklages)\
**Post date:** [18 March 2022 15:53 UTC](https://discourse.nodered.org/t/renaming-the-configuration-node-type-config-in-a-custom-node-best-practice/60041/1 "2022-03-18T15:53:42Z")

</div>

In my package node-red-contrib-sonos-plus the config node type is named "sonos-config". That interferes with another package and I would like to change the name to "sonosplus-config".

That means I have to rename it in

- package.json
- sonos-config.html
- sonos-config.js
- in my 2 nodes using the config data  
and I would like to rename the files sonos-config.js/html to sonosplus-config (consistency).

What does that mean for users of the package? Do the existing flows still work? Do users have to update/delete/recreate each config node?

---

<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:** [18 March 2022 16:01 UTC](https://discourse.nodered.org/t/renaming-the-configuration-node-type-config-in-a-custom-node-best-practice/60041/2 "2022-03-18T16:01:20Z")

</div>

> [@hklages](#):
>
> Do the existing flows still work?

No. If you change the types, then flows will look for, and not find, the old types.

Changing a node type name is a breaking change - there's no easy way around it.

> [@hklages](#):
>
> Do users have to update/delete/recreate each config node?

Yes - they will be notified they have 'unknown' nodes in the workspace. They will need to go find them in the Config Nodes sidebar and delete them. Then they will have to go into the flow nodes that are now missing the config node and create new config nodes.

---

<div class="post-metadata">

**Author:** ![hklages](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hklages/32/23899_2.png) [@hklages](https://discourse.nodered.org/u/hklages)\
**Post date:** [21 March 2022 16:24 UTC](https://discourse.nodered.org/t/renaming-the-configuration-node-type-config-in-a-custom-node-best-practice/60041/3 "2022-03-21T16:24:08Z")

</div>

Thanks for the prompt response (as always)!

The owner of the other package set his package on npm to "deprecated"  
[sonos](https://www.npmjs.com/package/node-red-contrib-sonos).  
He also removed the keyword.

But the package still shows up in the Node-RED library.  
What do we have to do to remove that package from Node-RED library.

Thanks for your advice.

---

<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:** [21 March 2022 16:26 UTC](https://discourse.nodered.org/t/renaming-the-configuration-node-type-config-in-a-custom-node-best-practice/60041/4 "2022-03-21T16:26:44Z")

</div>

> [@hklages](#):
>
> He also removed the keyword.

Have they published an update to npm with the keyword removed?

---

<div class="post-metadata">

**Author:** ![hklages](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hklages/32/23899_2.png) [@hklages](https://discourse.nodered.org/u/hklages)\
**Post date:** [21 March 2022 16:46 UTC](https://discourse.nodered.org/t/renaming-the-configuration-node-type-config-in-a-custom-node-best-practice/60041/5 "2022-03-21T16:46:55Z")

</div>

The link above shows the release 0.0.13, deprecated, last published: 21 hours ago and in the package.json the keyword is missing.

---

<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:** [21 March 2022 17:08 UTC](https://discourse.nodered.org/t/renaming-the-configuration-node-type-config-in-a-custom-node-best-practice/60041/6 "2022-03-21T17:08:10Z")

</div>

If you are logged into the flow library, clicking 'check for update' will remove the module if the latest version on npm no longer has the `node-red` keyword.... which I have just done for this module.

---

<div class="post-metadata">

**Author:** ![hklages](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hklages/32/23899_2.png) [@hklages](https://discourse.nodered.org/u/hklages)\
**Post date:** [21 March 2022 21:33 UTC](https://discourse.nodered.org/t/renaming-the-configuration-node-type-config-in-a-custom-node-best-practice/60041/7 "2022-03-21T21:33:25Z")

</div>

S u p e r 🙂👍  
Thanks.

---

<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:** [20 May 2022 21:33 UTC](https://discourse.nodered.org/t/renaming-the-configuration-node-type-config-in-a-custom-node-best-practice/60041/8 "2022-05-20T21:33:54Z")

</div>

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