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

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

Upgraded to NR version 1.2.9.
Still the problem persists.

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

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/
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

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.

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.

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

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