# Invalid tag name ""~"0.1.40" - Removing or Upgrading Modules

**URL:** <https://discourse.nodered.org/t/invalid-tag-name-0-1-40-removing-or-upgrading-modules/43330>\
**Category:** General\
**Created:** [28 March 2021 20:24 UTC](https://discourse.nodered.org/t/invalid-tag-name-0-1-40-removing-or-upgrading-modules/43330 "2021-03-28T20:24:23Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![nksky](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nksky/32/9173_2.png) [@nksky](https://discourse.nodered.org/u/nksky)\
**Post date:** [28 March 2021 20:24 UTC](https://discourse.nodered.org/t/invalid-tag-name-0-1-40-removing-or-upgrading-modules/43330/1 "2021-03-28T20:24:23Z")

</div>

Hi,

I am having an issue installing and removing nodes, Node-Red set up as a "project". When I try to remove or add nodes, I am getting this error. Where am I going wrong?  
Thanks in advance.

npm 7.7.5  
node 14.7.0  
NR 1.1.2

---

<div class="post-metadata">

**Author:** ![nksky](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nksky/32/9173_2.png) [@nksky](https://discourse.nodered.org/u/nksky)\
**Post date:** [28 March 2021 21:00 UTC](https://discourse.nodered.org/t/invalid-tag-name-0-1-40-removing-or-upgrading-modules/43330/2 "2021-03-28T21:00:08Z")

</div>

Upgraded to NR version 1.2.9.  
Still the problem persists.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [28 March 2021 21:13 UTC](https://discourse.nodered.org/t/invalid-tag-name-0-1-40-removing-or-upgrading-modules/43330/3 "2021-03-28T21:13:42Z")

</div>

currently we don't recommend using npm 7. please try reverting to the 6.x version.

---

<div class="post-metadata">

**Author:** ![nksky](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nksky/32/9173_2.png) [@nksky](https://discourse.nodered.org/u/nksky)\
**Post date:** [28 March 2021 21:33 UTC](https://discourse.nodered.org/t/invalid-tag-name-0-1-40-removing-or-upgrading-modules/43330/4 "2021-03-28T21:33:28Z")

</div>

Ive tried downgrading to 6.9.0, but the issue still exist and also a new error of npm not support node.js

* * *

2021-03-28T21:01:10.003Z Remove : node-red-contrib-string

2021-03-28T21:01:10.960Z npm remove --no-audit --no-update-notifier --no-fund --save node-red-contrib-string  
2021-03-28T21:01:15.132Z [err] npm  
2021-03-28T21:01:15.134Z [err]  
2021-03-28T21:01:15.135Z [err] ERR! code EINVALIDTAGNAME  
2021-03-28T21:01:15.167Z [err] npm  
2021-03-28T21:01:15.167Z [err] ERR! Invalid tag name ""~"0.1.40": Tags may not have any characters that encodeURIComponent encodes.  
2021-03-28T21:01:15.201Z [err]  
2021-03-28T21:01:15.201Z [err] npm ERR!  
2021-03-28T21:01:15.202Z [err] A complete log of this run can be found in:  
2021-03-28T21:01:15.202Z [err] npm ERR! /mnt/dietpi\_userdata/node-red/.npm/\_logs/2021-03-28T21\_01\_15\_170Z-debug.log  
2021-03-28T21:01:15.221Z rc=1

* * *

2021-03-28T21:31:47.798Z Remove : node-red-contrib-string

2021-03-28T21:31:48.789Z npm remove --no-audit --no-update-notifier --no-fund --save node-red-contrib-string  
2021-03-28T21:31:50.258Z [err] npm  
2021-03-28T21:31:50.259Z [err] WARN npm npm does not support Node.js v14.7.0  
2021-03-28T21:31:50.260Z [err] npm  
2021-03-28T21:31:50.260Z [err] WARN npm You should probably upgrade to a newer version of node as we  
2021-03-28T21:31:50.261Z [err] npm WARN npm can't make any promises that npm will work with this version.  
2021-03-28T21:31:50.261Z [err] npm WARN npm Supported releases of Node.js are the latest release of 6, 8, 9, 10, 11, 12.  
2021-03-28T21:31:50.262Z [err] npm WARN npm You can find the latest version at [https://nodejs.org/](https://nodejs.org/)  
2021-03-28T21:31:52.267Z [err] npm  
2021-03-28T21:31:52.267Z [err] ERR! cb.apply is not a function  
2021-03-28T21:31:52.332Z [err]  
2021-03-28T21:31:52.332Z [err] npm ERR! A complete log of this run can be found in:  
2021-03-28T21:31:52.332Z [err] npm  
2021-03-28T21:31:52.333Z [err] ERR! /mnt/dietpi\_userdata/node-red/.npm/\_logs/2021-03-28T21\_31\_52\_274Z-debug.log  
2021-03-28T21:31:52.353Z rc=1

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [28 March 2021 21:52 UTC](https://discourse.nodered.org/t/invalid-tag-name-0-1-40-removing-or-upgrading-modules/43330/5 "2021-03-28T21:52:08Z")

</div>

ISTR that you may also need to manually fixup package.json and/or package-lock.json to remove the extra quotes around the ~ character that npm7 inserted. Then redo.

---

<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:** [28 March 2021 21:57 UTC](https://discourse.nodered.org/t/invalid-tag-name-0-1-40-removing-or-upgrading-modules/43330/6 "2021-03-28T21:57:01Z")

</div>

Edit your `~/.node-red/package.json`, look under the dependencies section for `""~"0.1.40"` and replace it with `"~0.1.40"`.

There was a bug in an older version of Node-RED when used with npm 7 that would cause this invalid version to be saved to the file.

If you're on the latest version of Node-RED, there's no reason not to use npm 7.

---

<div class="post-metadata">

**Author:** ![nksky](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nksky/32/9173_2.png) [@nksky](https://discourse.nodered.org/u/nksky)\
**Post date:** [28 March 2021 22:48 UTC](https://discourse.nodered.org/t/invalid-tag-name-0-1-40-removing-or-upgrading-modules/43330/7 "2021-03-28T22:48:41Z")

</div>

Thank you very much. There was an extra "" in one particular line. Appreciate the quick response.

---

<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:** [11 April 2021 22:49 UTC](https://discourse.nodered.org/t/invalid-tag-name-0-1-40-removing-or-upgrading-modules/43330/8 "2021-04-11T22:49:20Z")

</div>

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