Errors updating multiple nodes: mysql, email

Debian 10
Node.js: 16.16.0
node-red: 2.2.2
node-red-node-email: 1.15.1
node-red-node-mysql: 1.0.2

I just updated node-red-node-mysql to 1.0.2 successfully. Tried to update the email node and got the below error. Saw there was another update for the mysql node, which failed.

I restarted NR after the successful mysql node update to 1.0.2, but cannot recall if it was before or after attempting to update the email node.

Any help would be appreciated.

-----------------------------------------------------------
2022-07-22T09:17:16.596Z Install : node-red-node-email 1.17.0

2022-07-22T09:17:16.674Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict node-red-node-email@1.17.0
2022-07-22T09:17:16.989Z [err] npm
2022-07-22T09:17:16.990Z [err]  
2022-07-22T09:17:16.990Z [err] WARN
2022-07-22T09:17:16.990Z [err]  
2022-07-22T09:17:16.990Z [err] config
2022-07-22T09:17:16.990Z [err]  production Use `--omit=dev` instead.
2022-07-22T09:17:19.564Z [err] npm
2022-07-22T09:17:19.565Z [err]  ERR! code
2022-07-22T09:17:19.565Z [err]  ENOTEMPTY
2022-07-22T09:17:19.565Z [err] npm 
2022-07-22T09:17:19.565Z [err] ERR! syscall
2022-07-22T09:17:19.565Z [err]  rename
2022-07-22T09:17:19.565Z [err] npm 
2022-07-22T09:17:19.565Z [err] ERR! 
2022-07-22T09:17:19.565Z [err] path /home/admin/.node-red/node_modules/node-red-node-email/node_modules/encoding-japanese/src
2022-07-22T09:17:19.565Z [err] npm ERR!
2022-07-22T09:17:19.565Z [err]  dest /home/admin/.node-red/node_modules/.node-red-node-email-6P3VYNZb/node_modules/encoding-japanese/src
2022-07-22T09:17:19.565Z [err] npm 
2022-07-22T09:17:19.565Z [err] ERR! errno
2022-07-22T09:17:19.565Z [err]  -39
2022-07-22T09:17:19.566Z [err] npm ERR!
2022-07-22T09:17:19.566Z [err]  ENOTEMPTY: directory not empty, rename '/home/admin/.node-red/node_modules/node-red-node-email/node_modules/encoding-japanese/src' -> '/home/admin/.node-red/node_modules/.node-red-node-email-6P3VYNZb/node_modules/encoding-japanese/src'
2022-07-22T09:17:19.567Z [err] 
2022-07-22T09:17:19.567Z [err] npm 
2022-07-22T09:17:19.567Z [err] ERR! A complete log of this run can be found in:
2022-07-22T09:17:19.567Z [err] npm 
2022-07-22T09:17:19.567Z [err] ERR!     /home/admin/.npm/_logs/2022-07-22T09_17_16_959Z-debug-0.log
2022-07-22T09:17:19.572Z rc=217
-----------------------------------------------------------
2022-07-22T10:09:28.197Z Install : node-red-node-mysql 1.0.3

2022-07-22T10:09:28.315Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict node-red-node-mysql@1.0.3
2022-07-22T10:09:28.620Z [err] npm
2022-07-22T10:09:28.621Z [err]  WARN config production Use `--omit=dev` instead.
2022-07-22T10:09:31.165Z [err] npm
2022-07-22T10:09:31.166Z [err]  
2022-07-22T10:09:31.166Z [err] ERR!
2022-07-22T10:09:31.166Z [err]  
2022-07-22T10:09:31.166Z [err] code
2022-07-22T10:09:31.166Z [err]  ENOTEMPTY
2022-07-22T10:09:31.166Z [err] npm
2022-07-22T10:09:31.166Z [err]  
2022-07-22T10:09:31.166Z [err] ERR!
2022-07-22T10:09:31.166Z [err]  
2022-07-22T10:09:31.166Z [err] syscall
2022-07-22T10:09:31.166Z [err]  rename
2022-07-22T10:09:31.166Z [err] npm
2022-07-22T10:09:31.167Z [err]  
2022-07-22T10:09:31.167Z [err] ERR!
2022-07-22T10:09:31.167Z [err]  
2022-07-22T10:09:31.167Z [err] path
2022-07-22T10:09:31.167Z [err]  /home/admin/.node-red/node_modules/node-red-node-email
2022-07-22T10:09:31.167Z [err] npm
2022-07-22T10:09:31.167Z [err]  
2022-07-22T10:09:31.167Z [err] ERR!
2022-07-22T10:09:31.167Z [err]  
2022-07-22T10:09:31.167Z [err] dest
2022-07-22T10:09:31.167Z [err]  /home/admin/.node-red/node_modules/.node-red-node-email-6P3VYNZb
2022-07-22T10:09:31.167Z [err] npm
2022-07-22T10:09:31.167Z [err]  
2022-07-22T10:09:31.167Z [err] ERR! errno
2022-07-22T10:09:31.168Z [err]  -39
2022-07-22T10:09:31.169Z [err] npm 
2022-07-22T10:09:31.169Z [err] ERR! ENOTEMPTY: directory not empty, rename '/home/admin/.node-red/node_modules/node-red-node-email' -> '/home/admin/.node-red/node_modules/.node-red-node-email-6P3VYNZb'
2022-07-22T10:09:31.170Z [err] 
2022-07-22T10:09:31.170Z [err] npm 
2022-07-22T10:09:31.170Z [err] ERR! A complete log of this run can be found in:
2022-07-22T10:09:31.170Z [err] npm ERR!
2022-07-22T10:09:31.170Z [err]      /home/admin/.npm/_logs/2022-07-22T10_09_28_591Z-debug-0.log
2022-07-22T10:09:31.175Z rc=217

Hi!

I have the same problem.

There must be a problem with the server where these are downloaded

Did you attempt to update a different node after the email node failed to update?

If you check the event log, does it mention the email node? Something like this:

2022-07-22T10:09:31.167Z [err] path
2022-07-22T10:09:31.167Z [err]  /home/admin/.node-red/node_modules/node-red-node-email
2022-07-22T10:09:31.167Z [err] npm
2022-07-22T10:09:31.167Z [err]  
2022-07-22T10:09:31.167Z [err] ERR!

I think it's related to the way the email node failed to update.

Hi!

For me that is also when I want something new installed.

Can you browse to your node-red folder then run npm ls and post the output here?

node-red-project@0.0.1 /home/madmax/.node-red

โ”œโ”€โ”€ @buglss/node-red-crontinject@1.0.18

โ”œโ”€โ”€ 3@2.1.0

โ”œโ”€โ”€ node-red-contrib-counter@0.1.6

โ”œโ”€โ”€ node-red-contrib-deconz@2.3.3

โ”œโ”€โ”€ node-red-contrib-fritz@1.4.5

โ”œโ”€โ”€ node-red-contrib-fs@1.4.1

โ”œโ”€โ”€ node-red-contrib-ftp@0.0.6

โ”œโ”€โ”€ node-red-contrib-homekit-bridged@1.4.3

โ”œโ”€โ”€ node-red-contrib-image-output@0.6.3

โ”œโ”€โ”€ node-red-contrib-image-tools@2.0.4

โ”œโ”€โ”€ node-red-contrib-lower@0.1.8

โ”œโ”€โ”€ node-red-contrib-pdfmake@1.1.0

โ”œโ”€โ”€ node-red-contrib-pdfparse@1.0.6

โ”œโ”€โ”€ node-red-contrib-random-item@1.0.3

โ”œโ”€โ”€ node-red-contrib-sftpco@1.0.17

โ”œโ”€โ”€ node-red-contrib-stoptimer@0.0.7

โ”œโ”€โ”€ node-red-contrib-suncron@1.6.1

โ”œโ”€โ”€ node-red-contrib-telegrambot@11.3.0

โ”œโ”€โ”€ node-red-contrib-tensorflow@0.2.2

โ”œโ”€โ”€ node-red-contrib-timed-counter@0.0.4

โ”œโ”€โ”€ node-red-contrib-web-page-screenshot@0.2.2

โ”œโ”€โ”€ node-red-dashboard@3.1.7

โ”œโ”€โ”€ node-red-node-email@1.17.0 invalid: "~1.15.1" from the root project

โ”œโ”€โ”€ node-red-node-openweathermap@0.5.1

โ””โ”€โ”€ node-red-node-ui-table@0.3.12

npm ERR! code ELSPROBLEMS

npm ERR! invalid: node-red-node-email@1.17.0 /home/madmax/.node-red/node_modules/node-red-node-email

npm ERR! A complete log of this run can be found in:

npm ERR! /home/madmax/.npm/_logs/2022-07-22T11_49_03_145Z-debug-0.log

In the same folder, run npm uninstall node-red-node-email

It should fail, post the output here.

In my case there's a folder that was generated during the email node's failed update that needs to be deleted.
I ran the following:
cd node_modules
rm -r .node-red-node-email-6P3VYNZb/
npm prune

After this I could update my other nodes. The folder you need to delete might be named something else.

We should wait till someone smarter than me tells us what to do about the email node.

Same issue here, with Raspberry Pi up to date, after I managed to successfully upgrade the email node on various Windows 10 virtual machines in the last few days.

node-red-email upgrade log:

-----------------------------------------------------------
2022-07-23T17:05:39.640Z Install : node-red-node-email 1.17.0

2022-07-23T17:05:39.636Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict node-red-node-email@1.17.0
2022-07-23T17:05:40.835Z [err] npm
2022-07-23T17:05:40.836Z [err]  
2022-07-23T17:05:40.837Z [err] WARN config production Use `--omit=dev` instead.
2022-07-23T17:05:46.599Z [err] npm
2022-07-23T17:05:46.600Z [err]  
2022-07-23T17:05:46.600Z [err] ERR!
2022-07-23T17:05:46.600Z [err]  code ENOTEMPTY
2022-07-23T17:05:46.601Z [err] npm
2022-07-23T17:05:46.601Z [err]  ERR!
2022-07-23T17:05:46.601Z [err]  syscall rename
2022-07-23T17:05:46.601Z [err] npm 
2022-07-23T17:05:46.602Z [err] ERR!
2022-07-23T17:05:46.602Z [err]  
2022-07-23T17:05:46.602Z [err] path /home/pi/.node-red/node_modules/node-red-node-email/node_modules/encoding-japanese/src
2022-07-23T17:05:46.602Z [err] npm 
2022-07-23T17:05:46.603Z [err] ERR! dest /home/pi/.node-red/node_modules/.node-red-node-email-eJQ2YdZ0/node_modules/encoding-japanese/src
2022-07-23T17:05:46.603Z [err] npm 
2022-07-23T17:05:46.604Z [err] ERR! errno -39
2022-07-23T17:05:46.607Z [err] npm ERR!
2022-07-23T17:05:46.607Z [err]  ENOTEMPTY: directory not empty, rename '/home/pi/.node-red/node_modules/node-red-node-email/node_modules/encoding-japanese/src' -> '/home/pi/.node-red/node_modules/.node-red-node-email-eJQ2YdZ0/node_modules/encoding-japanese/src'
2022-07-23T17:05:46.612Z [err] 
2022-07-23T17:05:46.612Z [err] npm 
2022-07-23T17:05:46.613Z [err] ERR! A complete log of this run can be found in:
2022-07-23T17:05:46.613Z [err] npm ERR!     /home/pi/.npm/_logs/2022-07-23T17_05_40_762Z-debug-0.log
2022-07-23T17:05:46.626Z rc=217

npm ls output

pi@raspberrypi:~/.node-red/node_modules $ cd ..
pi@raspberrypi:~/.node-red $ npm ls
node-red-project@0.0.1 /home/pi/.node-red
โ”œโ”€โ”€ bootstrap-vue@2.21.2
โ”œโ”€โ”€ node-red-admin@0.1.5
โ”œโ”€โ”€ node-red-contrib-arp@0.0.2
โ”œโ”€โ”€ node-red-contrib-device-stats@1.1.2
โ”œโ”€โ”€ node-red-contrib-eztimer@1.2.7
โ”œโ”€โ”€ node-red-contrib-ip@1.0.1
โ”œโ”€โ”€ node-red-contrib-modbus@5.21.2
โ”œโ”€โ”€ node-red-contrib-play-audio@2.5.0
โ”œโ”€โ”€ node-red-contrib-speedtest-updated@2.0.2
โ”œโ”€โ”€ node-red-contrib-telegrambot@12.0.0
โ”œโ”€โ”€ node-red-contrib-ui-led@0.4.11
โ”œโ”€โ”€ node-red-contrib-ui-media@1.2.0
โ”œโ”€โ”€ node-red-contrib-ui-time-scheduler@1.17.1
โ”œโ”€โ”€ node-red-dashboard@3.1.7
โ”œโ”€โ”€ node-red-node-arduino@0.3.1
โ”œโ”€โ”€ node-red-node-base64@0.3.0
โ”œโ”€โ”€ node-red-node-email@1.17.0 invalid: "~1.15.1" from the root project
โ”œโ”€โ”€ node-red-node-mysql@1.0.3
โ”œโ”€โ”€ node-red-node-openweathermap@0.5.1
โ”œโ”€โ”€ node-red-node-pi-gpio@2.0.5
โ”œโ”€โ”€ node-red-node-ping@0.3.1
โ”œโ”€โ”€ node-red-node-random@0.4.0
โ”œโ”€โ”€ node-red-node-serialport@1.0.1
โ”œโ”€โ”€ node-red-node-smooth@0.1.2
โ”œโ”€โ”€ node-red-node-tail@0.3.2
โ”œโ”€โ”€ node-red-node-ui-list@0.3.6
โ”œโ”€โ”€ node-red-node-ui-table@0.3.12
โ”œโ”€โ”€ node-red-node-wol@0.2.0
โ””โ”€โ”€ vue@2.6.14

npm ERR! code ELSPROBLEMS
npm ERR! invalid: node-red-node-email@1.17.0 /home/pi/.node-red/node_modules/node-red-node-email

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/pi/.npm/_logs/2022-07-23T17_08_22_717Z-debug-0.log

After this I tried to manually uninstall the email node, this is the output:

pi@raspberrypi:~/.node-red/node_modules $ npm uninstall node-red-email

removed 7 packages, changed 14 packages, and audited 532 packages in 17s

84 packages are looking for funding
  run `npm fund` for details

19 vulnerabilities (11 moderate, 5 high, 3 critical)

To address issues that do not require attention, run:
  npm audit fix

To address all issues possible (including breaking changes), run:
  npm audit fix --force

Some issues need review, and may require choosing
a different dependency.

Run `npm audit` for details.

Then I was able to upgrade other modules (mysql, gpio) succesfully, but when I tried to upgrade the email node again, it failed just like before.
I can't find any directory to be removed like @Ashfaak suggested.

Is the fact that it seems to be related to Japanese encoding relevant to your locality?

In all cases I have NodeJs 16.16.0 and NPM 8.15.0.

In Windows 10 Pro and Windows Server 2012, no error updating node-red-node-email

On Ubuntu (Amazon) , two different servers

022-07-23T18:48:07.610Z Install : node-red-node-email 1.17.0
2022-07-23T18:48:43.759Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict node-red-node-email@1.17.0
2022-07-23T18:48:44.162Z [err] npm
2022-07-23T18:48:44.162Z [err]
2022-07-23T18:48:44.163Z [err] WARN
2022-07-23T18:48:44.163Z [err]
2022-07-23T18:48:44.163Z [err] config
2022-07-23T18:48:44.163Z [err] production Use `--omit=dev` instead.
2022-07-23T18:48:45.272Z [err] npm
2022-07-23T18:48:45.272Z [err]
2022-07-23T18:48:45.273Z [err] ERR!
2022-07-23T18:48:45.273Z [err]
2022-07-23T18:48:45.273Z [err] code
2022-07-23T18:48:45.273Z [err] ENOTEMPTY
2022-07-23T18:48:45.274Z [err] npm
2022-07-23T18:48:45.274Z [err]
2022-07-23T18:48:45.274Z [err] ERR!
2022-07-23T18:48:45.275Z [err]
2022-07-23T18:48:45.275Z [err] syscall
2022-07-23T18:48:45.275Z [err] rename
2022-07-23T18:48:45.275Z [err] npm
2022-07-23T18:48:45.275Z [err]
2022-07-23T18:48:45.275Z [err] ERR!
2022-07-23T18:48:45.275Z [err]
2022-07-23T18:48:45.275Z [err] path
2022-07-23T18:48:45.275Z [err] /home/ubuntu/.node-red/node_modules/node-red-node-email/node_modules/encoding-japanese/src
2022-07-23T18:48:45.275Z [err] npm
2022-07-23T18:48:45.276Z [err]
2022-07-23T18:48:45.276Z [err] ERR!
2022-07-23T18:48:45.276Z [err]
2022-07-23T18:48:45.276Z [err] dest
2022-07-23T18:48:45.276Z [err] /home/ubuntu/.node-red/node_modules/.node-red-node-email-1mQPcOB9/node_modules/encoding-japanese/src
2022-07-23T18:48:45.276Z [err] npm
2022-07-23T18:48:45.276Z [err]
2022-07-23T18:48:45.276Z [err] ERR!
2022-07-23T18:48:45.276Z [err]
2022-07-23T18:48:45.276Z [err] errno
2022-07-23T18:48:45.277Z [err] -39
2022-07-23T18:48:45.278Z [err] npm
2022-07-23T18:48:45.278Z [err]
2022-07-23T18:48:45.278Z [err] ERR!
2022-07-23T18:48:45.278Z [err] ENOTEMPTY: directory not empty, rename '/home/ubuntu/.node-red/node_modules/node-red-node-email/node_modules/encoding-japanese/src' -> '/home/ubuntu/.node-red/node_modules/.node-red-node-email-1mQPcOB9/node_modules/encoding-japanese/src'
2022-07-23T18:48:45.280Z [err]
2022-07-23T18:48:45.280Z [err] npm
2022-07-23T18:48:45.280Z [err]
2022-07-23T18:48:45.280Z [err] ERR!
2022-07-23T18:48:45.280Z [err] A complete log of this run can be found in:
2022-07-23T18:48:45.280Z [err] npm
2022-07-23T18:48:45.280Z [err]
2022-07-23T18:48:45.280Z [err] ERR!
2022-07-23T18:48:45.280Z [err] /home/ubuntu/.npm/_logs/2022-07-23T18_48_44_115Z-debug-0.log
2022-07-23T18:48:45.288Z rc=217

Same issue on Oracle Ubuntu

Yesterday I got this same error regarding node-red-node-email encoding-japanese (which I don't think I use!) on a Raspberry Pi running Raspbian 10 Buster (node v16.15.1, npm v8.11.0, node-red 2.2.2).

It's different today though, maybe work is in progress?:
Manage palette offers an update 1.15.1 - 1.17.0, no error messages and it says it has updated but after restarting node-red it's still at 1.15.1.

I guess its to do with the OS being out of date?

Ok, i tried to follow the instruction in the failed upgrade log:

022-07-23T16:46:51.246Z Install : node-red-node-email 1.17.0

2022-07-23T16:46:51.200Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict node-red-node-email@1.17.0
2022-07-23T16:46:52.398Z [err] npm
2022-07-23T16:46:52.400Z [err]  WARN
2022-07-23T16:46:52.400Z [err]  config production Use `--omit=dev` instead.
2022-07-23T16:46:57.760Z [err] npm
2022-07-23T16:46:57.760Z [err]  ERR! code
2022-07-23T16:46:57.761Z [err]  ENOTEMPTY
2022-07-23T16:46:57.761Z [err] npm 
2022-07-23T16:46:57.761Z [err] ERR! syscall rename
2022-07-23T16:46:57.762Z [err] npm 
2022-07-23T16:46:57.762Z [err] ERR!
2022-07-23T16:46:57.762Z [err]  path /home/pi/.node-red/node_modules/node-red-node-email/node_modules/encoding-japanese/src
2022-07-23T16:46:57.762Z [err] npm
2022-07-23T16:46:57.763Z [err]  ERR! dest /home/pi/.node-red/node_modules/.node-red-node-email-eJQ2YdZ0/node_modules/encoding-japanese/src
2022-07-23T16:46:57.763Z [err] npm ERR!
2022-07-23T16:46:57.764Z [err]  errno
2022-07-23T16:46:57.764Z [err]  -39
2022-07-23T16:46:57.767Z [err] npm ERR!
2022-07-23T16:46:57.768Z [err]  ENOTEMPTY: directory not empty, rename '/home/pi/.node-red/node_modules/node-red-node-email/node_modules/encoding-japanese/src' -> '/home/pi/.node-red/node_modules/.node-red-node-email-eJQ2YdZ0/node_modules/encoding-japanese/src'
2022-07-23T16:46:57.772Z [err] 
2022-07-23T16:46:57.772Z [err] npm 
2022-07-23T16:46:57.773Z [err] ERR! A complete log of this run can be found in:
2022-07-23T16:46:57.773Z [err] npm ERR!     /home/pi/.npm/_logs/2022-07-23T16_46_52_327Z-debug-0.log
2022-07-23T16:46:57.786Z rc=217

In the terminal I run this command to rename to node-red-node-email folder as suggested:

$ mv /home/pi/.node-red/node_modules/node-red-node-email /home/pi/.node-red/node_modules/.node-red-node-email-eJQ2YdZ0

Now the installation from the command palette apparently works (no errors displayed), but after a Node-RED restart in the command palette there is still the old version (1.15.1) and the option to upgrade...

$ cd /home/pi/.node-red
$ npm ls

node-red-project@0.0.1 /home/pi/.node-red
โ”œโ”€โ”€ bootstrap-vue@2.21.2
โ”œโ”€โ”€ node-red-admin@0.1.5
โ”œโ”€โ”€ node-red-contrib-arp@0.0.2
โ”œโ”€โ”€ node-red-contrib-device-stats@1.1.2
โ”œโ”€โ”€ node-red-contrib-eztimer@1.2.7
โ”œโ”€โ”€ node-red-contrib-ip@1.0.1
โ”œโ”€โ”€ node-red-contrib-modbus@5.21.2
โ”œโ”€โ”€ node-red-contrib-play-audio@2.5.0
โ”œโ”€โ”€ node-red-contrib-speedtest-updated@2.0.2
โ”œโ”€โ”€ node-red-contrib-telegrambot@12.0.0
โ”œโ”€โ”€ node-red-contrib-ui-led@0.4.11
โ”œโ”€โ”€ node-red-contrib-ui-media@1.2.0
โ”œโ”€โ”€ node-red-contrib-ui-time-scheduler@1.17.1
โ”œโ”€โ”€ node-red-dashboard@3.1.7
โ”œโ”€โ”€ node-red-node-arduino@0.3.1
โ”œโ”€โ”€ node-red-node-base64@0.3.0
โ”œโ”€โ”€ node-red-node-email@1.17.0
โ”œโ”€โ”€ node-red-node-mysql@1.0.3
โ”œโ”€โ”€ node-red-node-openweathermap@0.5.1
โ”œโ”€โ”€ node-red-node-pi-gpio@2.0.5
โ”œโ”€โ”€ node-red-node-ping@0.3.1
โ”œโ”€โ”€ node-red-node-random@0.4.0
โ”œโ”€โ”€ node-red-node-serialport@1.0.1
โ”œโ”€โ”€ node-red-node-smooth@0.1.2
โ”œโ”€โ”€ node-red-node-tail@0.3.2
โ”œโ”€โ”€ node-red-node-ui-list@0.3.6
โ”œโ”€โ”€ node-red-node-ui-table@0.3.12
โ”œโ”€โ”€ node-red-node-wol@0.2.0
โ””โ”€โ”€ vue@2.6.14

I suspect the problem was more that the install of the email node failed because it could not rename that folder due to it already being present. You have now renamed this but the install never completed. I would suggest you need to delete/home/pi/.node-red/node_modules/.node-red-node-email-eJQ2YdZ0 then try to install once more.

1 Like

@Steve-Mcl you're right, thank you. I did like you suggested and it worked out fine!

Thanks Steve, the solution you provided solved the problem

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