# Change name node-red contrib node after publishing on npm

**URL:** <https://discourse.nodered.org/t/change-name-node-red-contrib-node-after-publishing-on-npm/24784>\
**Category:** Developing Nodes\
**Created:** [14 April 2020 03:01 UTC](https://discourse.nodered.org/t/change-name-node-red-contrib-node-after-publishing-on-npm/24784 "2020-04-14T03:01:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![taminhhienmor](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/taminhhienmor/32/19779_2.png) [@taminhhienmor](https://discourse.nodered.org/u/taminhhienmor)\
**Post date:** [14 April 2020 03:01 UTC](https://discourse.nodered.org/t/change-name-node-red-contrib-node-after-publishing-on-npm/24784/1 "2020-04-14T03:01:03Z")

</div>

Hi everyone,  
Can I change name my node after publishing that node Or I must publish a new node?

Thanks,  
Hien

---

<div class="post-metadata">

**Author:** ![Hypnos](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hypnos/32/7566_2.png) [@Hypnos](https://discourse.nodered.org/u/Hypnos)\
**Post date:** [14 April 2020 08:19 UTC](https://discourse.nodered.org/t/change-name-node-red-contrib-node-after-publishing-on-npm/24784/2 "2020-04-14T08:19:00Z")

</div>

I don't know if the internal name could changed (I don't think). But you could change the palette label and the label in Node red. So the appearance of the node could changed that for the user it has a different name.

---

<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:** [14 April 2020 08:35 UTC](https://discourse.nodered.org/t/change-name-node-red-contrib-node-after-publishing-on-npm/24784/3 "2020-04-14T08:35:57Z")

</div>

If you want to change the name of the module you have published to npm then you should first use `npm unpublish` to remove the old module. NPM restricts what can be unpublished so you may find this doesn't work - if that's the case, see below.

Once you have removed the old module, you can then `npm publish` the module under its new name.

If the unpublish fails, before publishing the new module you should:

1. update the package.json of the module to remove the `node-red` keyword and publish a new version. That will get it removed from the flow library (eventually).
2. use `npm deprecate` to mark your module as deprecated.

---

<div class="post-metadata">

**Author:** ![taminhhienmor](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/taminhhienmor/32/19779_2.png) [@taminhhienmor](https://discourse.nodered.org/u/taminhhienmor)\
**Post date:** [15 April 2020 02:12 UTC](https://discourse.nodered.org/t/change-name-node-red-contrib-node-after-publishing-on-npm/24784/4 "2020-04-15T02:12:33Z")

</div>

Thank you @Hypnos and @knolleary

---

<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:** [14 June 2020 02:18 UTC](https://discourse.nodered.org/t/change-name-node-red-contrib-node-after-publishing-on-npm/24784/5 "2020-06-14T02:18:21Z")

</div>

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