Unfortunately, no node updates are possible for me

Hello everyone!
Unfortunately, no node updates are possible for me.
Examples:
a) node-red-contrib-opcua from 0.2.291 to actuel 0.2.292
b) node-red-dashboard from 3.2.0 auf actuel 3.2.3

It is also not possible to uninstall unused nodes.
My system:

  • Raspberry pi 4 8GB, 64Gb SD, 80% free
  • updates actuel
  • Docker version 20.10.21, build baeda1f
    -- Container: Portainer, Node-Red, influxDB, grafana (*.latest)
  • node red: 3.0.2: Maintenance Release
    --npm 8.11.0

How can I eliminate this problem?

Thank you very much for your help!

greeting

Hagen Lossin

The log looks like this:

-----------------------------------------------------------
2022-12-01T08:39:07.257Z Installieren : node-red-contrib-opcua 0.2.292

2022-12-01T08:39:07.494Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict node-red-contrib-opcua@0.2.292
2022-12-01T08:39:08.687Z [err] npm
2022-12-01T08:39:08.688Z [err]  WARN 
2022-12-01T08:39:08.688Z [err] config production Use `--omit=dev` instead.
2022-12-01T08:39:11.932Z [err] npm
2022-12-01T08:39:11.932Z [err]  
2022-12-01T08:39:11.933Z [err] ERR!
2022-12-01T08:39:11.933Z [err]  
2022-12-01T08:39:11.934Z [err] code
2022-12-01T08:39:11.934Z [err]  ENOTEMPTY
2022-12-01T08:39:11.935Z [err] npm
2022-12-01T08:39:11.935Z [err]  
2022-12-01T08:39:11.935Z [err] ERR!
2022-12-01T08:39:11.936Z [err]  
2022-12-01T08:39:11.936Z [err] syscall
2022-12-01T08:39:11.936Z [err]  rename
2022-12-01T08:39:11.937Z [err] npm
2022-12-01T08:39:11.937Z [err]  
2022-12-01T08:39:11.937Z [err] ERR!
2022-12-01T08:39:11.938Z [err]  
2022-12-01T08:39:11.938Z [err] path
2022-12-01T08:39:11.939Z [err]  /data/node_modules/node-red-contrib-opcua
2022-12-01T08:39:11.939Z [err] npm
2022-12-01T08:39:11.939Z [err]  
2022-12-01T08:39:11.939Z [err] ERR!
2022-12-01T08:39:11.940Z [err]  
2022-12-01T08:39:11.940Z [err] dest
2022-12-01T08:39:11.940Z [err]  /data/node_modules/.node-red-contrib-opcua-PzFixMVZ
2022-12-01T08:39:11.941Z [err] npm
2022-12-01T08:39:11.941Z [err]  
2022-12-01T08:39:11.941Z [err] ERR!
2022-12-01T08:39:11.941Z [err]  
2022-12-01T08:39:11.942Z [err] errno
2022-12-01T08:39:11.942Z [err]  -39
2022-12-01T08:39:11.945Z [err] npm
2022-12-01T08:39:11.946Z [err]  
2022-12-01T08:39:11.946Z [err] ERR!
2022-12-01T08:39:11.946Z [err]  ENOTEMPTY: directory not empty, rename '/data/node_modules/node-red-contrib-opcua' -> '/data/node_modules/.node-red-contrib-opcua-PzFixMVZ'
2022-12-01T08:39:11.951Z [err] 
2022-12-01T08:39:11.952Z [err] npm
2022-12-01T08:39:11.952Z [err]  
2022-12-01T08:39:11.953Z [err] ERR!
2022-12-01T08:39:11.953Z [err]  A complete log of this run can be found in:
2022-12-01T08:39:11.953Z [err] npm
2022-12-01T08:39:11.953Z [err]  
2022-12-01T08:39:11.953Z [err] ERR!
2022-12-01T08:39:11.954Z [err]      /data/.npm/_logs/2022-12-01T08_39_08_584Z-debug-0.log
2022-12-01T08:39:11.971Z rc=217

Welcome to the forum @HagenLossin

This is a known npm related issue that occurs occasionally, but the cause has not so far been identified. If you go to the folder /data/node_modules/ and delete any folders starting with a dot and then try again, you should be ok.

Thank you for your prompt reply!
unfortunately did not have the desired success

log:

0 verbose cli /usr/local/bin/node /usr/local/bin/npm
1 info using npm@8.11.0
2 info using node@v16.16.0
3 timing npm:load:whichnode Completed in 1ms
4 timing config:load:defaults Completed in 11ms
5 timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in 2ms
6 timing config:load:builtin Completed in 3ms
7 warn config production Use `--omit=dev` instead.
8 timing config:load:cli Completed in 9ms
9 timing config:load:env Completed in 1ms
10 timing config:load:file:/data/.npmrc Completed in 1ms
11 timing config:load:project Completed in 23ms
12 timing config:load:file:/usr/src/node-red/.npmrc Completed in 1ms
13 timing config:load:user Completed in 1ms
14 timing config:load:file:/usr/local/etc/npmrc Completed in 3ms
15 timing config:load:global Completed in 4ms
16 timing config:load:validate Completed in 1ms
17 timing config:load:credentials Completed in 3ms
18 timing config:load:setEnvs Completed in 3ms
19 timing config:load Completed in 64ms
20 timing npm:load:configload Completed in 64ms
21 timing npm:load:mkdirpcache Completed in 3ms
22 timing npm:load:mkdirplogs Completed in 1ms
23 verbose title npm install node-red-contrib-opcua@0.2.292
24 verbose argv "install" "--no-audit" "--no-update-notifier" "--no-fund" "--save" "--save-prefix" "~" "--production" "--engine-strict" "node-red-contrib-opcua@0.2.292"
25 timing npm:load:setTitle Completed in 5ms
26 timing config:load:flatten Completed in 11ms
27 timing npm:load:display Completed in 17ms
28 verbose logfile logs-max:10 dir:/data/.npm/_logs
29 verbose logfile /data/.npm/_logs/2022-12-01T10_52_35_489Z-debug-0.log
30 timing npm:load:logFile Completed in 18ms
31 timing npm:load:timers Completed in 0ms
32 timing npm:load:configScope Completed in 0ms
33 timing npm:load Completed in 113ms
34 timing arborist:ctor Completed in 2ms
35 silly logfile start cleaning logs, removing 1 files
36 silly logfile done cleaning log files
37 timing idealTree:init Completed in 1026ms
38 timing idealTree:userRequests Completed in 7ms
39 silly idealTree buildDeps
40 silly fetch manifest node-red-contrib-opcua@0.2.292
41 verbose shrinkwrap failed to load node_modules/.package-lock.json out of date, updated: node_modules
42 http fetch GET 200 https://registry.npmjs.org/node-red-contrib-opcua 1324ms (cache revalidated)
43 silly placeDep ROOT node-red-contrib-opcua@0.2.292 REPLACE for: node-red-project@0.0.1 want: 0.2.292
44 timing idealTree:#root Completed in 1361ms
45 timing idealTree:node_modules/node-red-contrib-opcua Completed in 0ms
46 timing idealTree:buildDeps Completed in 1365ms
47 timing idealTree:fixDepFlags Completed in 26ms
48 timing idealTree Completed in 2443ms
49 timing reify:loadTrees Completed in 2445ms
50 timing reify:diffTrees Completed in 35ms
51 silly reify mark retired [ '/data/node_modules/node-red-contrib-opcua' ]
52 silly reify moves {
52 silly reify   '/data/node_modules/node-red-contrib-opcua': '/data/node_modules/.node-red-contrib-opcua-PzFixMVZ'
52 silly reify }
53 timing reify:rollback:retireShallow Completed in 2ms
54 timing command:install Completed in 2515ms
55 verbose stack Error: ENOTEMPTY: directory not empty, rename '/data/node_modules/node-red-contrib-opcua' -> '/data/node_modules/.node-red-contrib-opcua-PzFixMVZ'
56 verbose cwd /data
57 verbose Linux 5.15.76-v8+
58 verbose node v16.16.0
59 verbose npm  v8.11.0
60 error code ENOTEMPTY
61 error syscall rename
62 error path /data/node_modules/node-red-contrib-opcua
63 error dest /data/node_modules/.node-red-contrib-opcua-PzFixMVZ
64 error errno -39
65 error ENOTEMPTY: directory not empty, rename '/data/node_modules/node-red-contrib-opcua' -> '/data/node_modules/.node-red-contrib-opcua-PzFixMVZ'
66 verbose exit -39
67 timing npm Completed in 2852ms
68 verbose unfinished npm timer reify 1669891955816
69 verbose unfinished npm timer reify:retireShallow 1669891958313
70 verbose code -39
71 error A complete log of this run can be found in:
71 error     /data/.npm/_logs/2022-12-01T10_52_35_489Z-debug-0.log

Did you delete '/data/node_modules/.node-red-contrib-opcua-PzFixMVZ' ?

↑ this comment suggests it is still there!

Yes.

What directory is that? where is that? It doesnt look right at all. There should not be a .package-lock file there.

looking at the path /data/xxx mentioned in the logs, it suggests this is a docker image? If so, did you enter the terminal for that container? or go to the mapped path for /data/?

docker -> nodered container -> terminal

You are not very forthcoming with details! It makes it hard to help & makes us ask more and more questions, over and over! For example...

What "did not have the desired success"?
What did you actually do?, what command did you issue?, what result did you see? did you check the directory was present & that is was gone after deletion?

Ummm "yes" what? What does that image show me? That could be the screenshot of any directory in the world - not only that, it doesnt show me what directories do or do not exist (only that there are at least 3 things inside (one of which is cut off)).



Anyhow, moving on.


Let me put it this way.

If NPM fails and tells you ENOTEMPTY: directory not empty, rename '/data/node_modules/node-red-contrib-opcua' -> '/data/node_modules/.node-red-contrib-opcua-ABCDEFG' then you need to delete '/data/node_modules/.node-red-contrib-opcua-ABCDEFG' then try install again.

If that fails try the www...

as described in the introduction, I use nodered in a docker container. so I'm assuming everything is happening inside the docker-container.
as recommended before the last installation I have the folders:
.bin and
.node-red-contrib-opcua-PzFixMVZ
both deleted
(the small picture should demonstrate this)
and then restarted the nodered container
only now have I triggered the update "node-red-contrib-opcua".
the last log documented the result

Do you mean the folder has come back again?
No need to restart the container by the way.
Delete it and make sure it is not there immediately before you attempt the node update.

the folders don't come back

before I start the update:

tthe node-red log:

-----------------------------------------------------------
2022-12-01T14:22:27.237Z Installieren : node-red-contrib-opcua 0.2.292

2022-12-01T14:22:27.307Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict node-red-contrib-opcua@0.2.292
2022-12-01T14:22:28.498Z [err] npm
2022-12-01T14:22:28.499Z [err]  WARN 
2022-12-01T14:22:28.499Z [err] config production Use `--omit=dev` instead.
2022-12-01T14:22:31.727Z [err] npm
2022-12-01T14:22:31.727Z [err]  
2022-12-01T14:22:31.727Z [err] ERR!
2022-12-01T14:22:31.728Z [err]  code ENOTEMPTY
2022-12-01T14:22:31.728Z [err] npm
2022-12-01T14:22:31.728Z [err]  ERR!
2022-12-01T14:22:31.729Z [err]  syscall rename
2022-12-01T14:22:31.729Z [err] npm 
2022-12-01T14:22:31.729Z [err] ERR! path
2022-12-01T14:22:31.730Z [err]  /data/node_modules/node-red-contrib-opcua
2022-12-01T14:22:31.730Z [err] npm ERR!
2022-12-01T14:22:31.730Z [err]  dest /data/node_modules/.node-red-contrib-opcua-PzFixMVZ
2022-12-01T14:22:31.731Z [err] npm ERR! errno
2022-12-01T14:22:31.731Z [err]  -39
2022-12-01T14:22:31.734Z [err] npm ERR! ENOTEMPTY: directory not empty, rename '/data/node_modules/node-red-contrib-opcua' -> '/data/node_modules/.node-red-contrib-opcua-PzFixMVZ'
2022-12-01T14:22:31.738Z [err] 
2022-12-01T14:22:31.739Z [err] npm ERR! A complete log of this run can be found in:
2022-12-01T14:22:31.739Z [err] npm ERR!     /data/.npm/_logs/2022-12-01T14_22_28_389Z-debug-0.log
2022-12-01T14:22:31.756Z rc=217

the folders don't come back

Are you sure? ls -a may not show dot files first, depending on your collate settings.
Scroll down to that exact folder name to make sure. Or run
ls -d \.*

In that case I think you must be in the wrong folder. Always previously when anyone has that problem then the folder does exist.

An alternative is to use the sledgehammer. Remove (or rename) /data/node_modules completely and restart node-red and make sure it fails to run due to the missing modules. Then, in the /data folder run
npm install
which will rebuild it.

[Edit] On second thoughts definitely rename, don't delete, in case it is a disaster. I am not sure whether node-red itself is installed inside that folder and whether npm install would re-install it.

Thank you again for your support.
Using the Docker concept has proven to be the fastest and most effective way.
Created a new Node-red container with a new volume, downloaded the repository, reinstalled and set up nodes, and lo and behold, it's working.

1 Like

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