Unable to delete OPCUA nodes

Hi to all,

After the update of the OPCUA node to the version 2.92.2 I can't delete the OPC nodes from node red, and in the meantime I can't delete the module from the manage palette.
I'm becaming crazy, because if I delete an OPC UA node I can't deploy Node Red, while if I delete,for exemple , a function node, I can deploy.
I also try to delete manually from the cmd the node with this function:

cd .node-red -> npm remove node-red-contrib-opcua

But nothing, it arrives at a quarter of the bar and then it stops.
I attach a short video that explain my problem....

I hope that somebody can help me..

Thank in advance!

Have a look in Configuration Nodes and click Unused at the top. I suspect there may be an unused config file there.

However that should not stop you removing it via the command line. If removing config nodes doesn't fix it then post the output you get when you run the npm remove command.

Hi Colin,
Thanks first of all;
I delete ALL the endpoint of the OPCUA in the config nodes, but nothing changed.
I am seeing now that even if I only move an OPC node in the same flow, I can no longer deploy ... without words
I have tryed another things, I have exported all my node red flows (from my VMachine) and imported it on another PC (on the same PC but in the phisical machine this time) without update the opcua node.
And now I have the same problem also on the phisical machine.
This is incredible because I worked all time yesterday with OPCUA nodes (not updated) without any problem.
Today after the update, a disaster...

In the image the node doesn't want to go on..

Looking at the issues in the node's github page it appears that there are some breaking changes in the latest version, though they don't mention your problem. Try reverting to the previous version and see if it fixes it
npm install node-red-contrib-opcua@0.2.91
Then restart node-red

Hi Colin,
I've Done that now, but nothing changed.
If I delete an OPCUA node then Node-Red doesn't want to deploy.....
No Error on CMD, this is what is written :

Microsoft Windows [Versione 10.0.19042.685]
(c) 2020 Microsoft Corporation. Tutti i diritti sono riservati.

C:\Users\carmi>node-red
13 Jan 18:56:27 - [info]

Welcome to Node-RED

13 Jan 18:56:28 - [info] Node-RED version: v1.2.2
13 Jan 18:56:28 - [info] Node.js version: v12.18.4
13 Jan 18:56:28 - [info] Windows_NT 10.0.19042 x64 LE
13 Jan 18:56:32 - [info] Loading palette nodes
13 Jan 18:56:43 - [s7comm-Error] - Installation of Module net-keepalive failed because we might be on the wrong OS. OS=win32
13 Jan 18:56:43 - [s7comm-Info] - Debug configuration for logLevelNodeS7:{"debug":0,"silent":true}
13 Jan 18:56:43 - [s7comm-Info] - Debug configuration for logLevelNodeRED:{"debug":2,"silent":true}
13 Jan 18:56:43 - [info] Dashboard version 2.26.2 started at /ui
13 Jan 18:56:44 - [info] Settings file : \Users\carmi.node-red\settings.js
13 Jan 18:56:44 - [info] HTTP Static : C:\Download
13 Jan 18:56:44 - [info] Context store : 'default' [module=memory]
13 Jan 18:56:44 - [info] User directory : \Users\carmi.node-red
13 Jan 18:56:44 - [warn] Projects disabled : editorTheme.projects.enabled=false
13 Jan 18:56:44 - [info] Flows file : \Users\carmi.node-red\flows_DESKTOP-8CKNCJJ.json
13 Jan 18:56:44 - [info] Server now running at http://127.0.0.1:1880/
13 Jan 18:56:44 - [warn]


Your flow credentials file is encrypted using a system-generated key.

If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.

You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.

13 Jan 18:56:44 - [info] Starting flows
13 Jan 18:56:44 - [info] Started flows
13 Jan 18:57:08 - [info] Stopping flows
13 Jan 18:57:09 - [info] Stopped flows
13 Jan 18:57:09 - [info] Starting flows
13 Jan 18:57:09 - [info] Started flows

Try
npm remove --verbose node-red-contrib-opcua
that should provide vast amounts of mostly incomprehensible output, which may or may not be helpful.

For the future please, if possible, copy/paste text here rather than using screenshots. When pasting use the </> button at the top of the forum text window.

[Edit] Also post the file package.json please, I wonder whether there is something amis there.

Hi Colin ,
Thanks, I've done what you said.
This is what I have :

Microsoft Windows [Versione 10.0.19042.685]
(c) 2020 Microsoft Corporation. Tutti i diritti sono riservati.

C:\Users\carmi>npm remove --verbose node-red-contrib-opcua
npm info it worked if it ends with ok
npm verb cli [
npm verb cli   'C:\\Program Files\\nodejs\\node.exe',
npm verb cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
npm verb cli   'remove',
npm verb cli   '--verbose',
npm verb cli   'node-red-contrib-opcua'
npm verb cli ]
npm info using npm@6.14.6
npm info using node@v12.18.4
npm verb config Skipping project config: C:\Users\carmi/.npmrc. (matches userconfig)
npm verb npm-session ef7a30ef61f501be
npm timing stage:loadCurrentTree Completed in 33ms
npm timing stage:loadIdealTree:cloneCurrentTree Completed in 0ms
npm timing stage:loadIdealTree:loadShrinkwrap Completed in 7ms
npm timing stage:loadIdealTree:loadAllDepsIntoIdealTree Completed in 7ms
npm timing stage:loadIdealTree Completed in 34ms
npm timing stage:generateActionsToTake Completed in 8ms
npm verb correctMkdir C:\Users\carmi\AppData\Roaming\npm-cache\_locks correctMkdir not in flight; initializing
npm verb makeCacheDir UID & GID are irrelevant on win32
npm verb lock using C:\Users\carmi\AppData\Roaming\npm-cache\_locks\staging-6edbf67661edf3e1.lock for C:\Users\carmi\node_modules\.staging
npm verb unlock done using C:\Users\carmi\AppData\Roaming\npm-cache\_locks\staging-6edbf67661edf3e1.lock for C:\Users\carmi\node_modules\.staging
npm timing stage:executeActions Completed in 136ms
npm timing stage:rollbackFailedOptional Completed in 0ms
npm timing stage:runTopLevelLifecycles Completed in 237ms
npm WARN saveError ENOENT: no such file or directory, open 'C:\Users\carmi\package.json'
npm info lifecycle undefined~preshrinkwrap: undefined
npm info lifecycle undefined~shrinkwrap: undefined
npm notice created a lockfile as package-lock.json. You should commit this file.
npm info lifecycle undefined~postshrinkwrap: undefined
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\carmi\package.json'
npm verb enoent This is related to npm not being able to find a file.
npm verb enoent
npm WARN carmi No description
npm WARN carmi No repository field.
npm WARN carmi No README data
npm WARN carmi No license field.

npm timing audit submit Completed in 1480ms
npm http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/audits/quick 1485ms
npm timing audit body Completed in 12ms
up to date in 1.611s
found 0 vulnerabilities

npm verb exit [ 0, true ]
npm timing npm Completed in 3465ms
npm info ok

C:\Users\carmi>

This is the package.json taken from the .node-red folder :

package.json (555 Bytes)

Thanks again for your support!

You are not in the correct folder, you must uninstall non-global modules from your .node-red folder.

1 Like

Sorry, you are right.
This is what I read now :

C:\Users\carmi\.node-red>npm remove --verbose node-red-contrib-opcua
npm info it worked if it ends with ok
npm verb cli [
npm verb cli   'C:\\Program Files\\nodejs\\node.exe',
npm verb cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
npm verb cli   'remove',
npm verb cli   '--verbose',
npm verb cli   'node-red-contrib-opcua'
npm verb cli ]
npm info using npm@6.14.6
npm info using node@v12.18.4
npm verb npm-session 4739ecae8e91da8c
npm timing stage:loadCurrentTree Completed in 3616ms
npm timing stage:loadIdealTree:cloneCurrentTree Completed in 27ms
npm timing stage:loadIdealTree:loadShrinkwrap Completed in 1332ms
npm timing stage:loadIdealTree:loadAllDepsIntoIdealTree Completed in 1822ms

Update :

opcua.txt (110.1 KB)

this above is the result of the cmd (is too long, I can't paste it in </>)

After 38min from the blocked line npm timing stage:loadIdealTree:loadAllDepsIntoIdealTree Completed in 1822ms the process went on. Now I'll test if I can deploy my flow or not

I re-installed the opcua node, and there was yet a new version from yesterday, the 2.93.0 so maybe I think that some bug and errors are changed with the new version, because now I can work and deploy with node red.

Thanks again Colin for your support !

1 Like

It seems that npm was confused about something, quite likely nothing to do with the opc node at all, but I don't know enough about how npm works to comment. Possibly something in its cache was messed up.

Lets hope it has now sorted itself out.