question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Palette update problem

See original GitHub issue

What are the steps to reproduce?

Open “Manage palette” and press “update to x.x.x” for update palette

What happens?

I have install NodeRED 1.0.3 as root (with official script…y, y, N) After update to 1.0.4 the update from “Manage palette” stop working Updates fail for uncorrect user permission and if I restart NodeRED the palette is not already install. This is the result log:

-----------------------------------------------------------
2020-04-10T08:40:15.852Z Install : node-red-contrib-modbus 5.9.0

2020-04-10T08:40:16.619Z npm install --no-audit --no-update-notifier --save --save-prefix="~" --production node-red-contrib-modbus@5.9.0
2020-04-10T08:40:48.054Z [out] 
2020-04-10T08:40:48.054Z [out] > node-red-contrib-modbus@5.9.0 postinstall /root/.node-red/node_modules/node-red-contrib-modbus
2020-04-10T08:40:48.054Z [out] > node ./supporter.js
2020-04-10T08:40:48.054Z [out] 
2020-04-10T08:40:50.087Z [err] npm
2020-04-10T08:40:50.088Z [err]  WARN node-red-project@0.0.1 No repository field.
2020-04-10T08:40:50.088Z [err] npm WARN node-red-project@0.0.1 No license field.
2020-04-10T08:40:50.089Z [err] 
2020-04-10T08:40:50.202Z [err] npm
2020-04-10T08:40:50.203Z [err]  ERR! code EUIDLOOKUP
2020-04-10T08:40:50.203Z [err] npm ERR! lifecycle User identifier does not exist: rootcd
2020-04-10T08:40:50.204Z [err] npm ERR! 
2020-04-10T08:40:50.204Z [err] npm ERR!
2020-04-10T08:40:50.204Z [err]  Failed to look up the user/group for running scripts.
2020-04-10T08:40:50.204Z [err] npm ERR! 
2020-04-10T08:40:50.204Z [err] npm
2020-04-10T08:40:50.204Z [err]  ERR! Try again with a different --user or --group settings, or
2020-04-10T08:40:50.204Z [err] npm ERR!
2020-04-10T08:40:50.205Z [err]  run with --unsafe-perm to execute scripts as root.
2020-04-10T08:40:50.278Z [err] 
2020-04-10T08:40:50.279Z [err] npm ERR! A complete log of this run can be found in:
2020-04-10T08:40:50.279Z [err] npm ERR!     /root/.npm/_logs/2020-04-10T08_40_50_235Z-debug.log
2020-04-10T08:40:50.307Z rc=1

-----------------------------------------------------------
2020-04-10T08:42:38.969Z Install : node-red-contrib-simpletime 2.9.1

2020-04-10T08:42:39.717Z npm install --no-audit --no-update-notifier --save --save-prefix="~" --production node-red-contrib-simpletime@2.9.1
2020-04-10T08:43:04.221Z [out] 
2020-04-10T08:43:04.221Z [out] > node-red-contrib-modbus@5.8.0 postinstall /root/.node-red/node_modules/node-red-contrib-modbus
2020-04-10T08:43:04.221Z [out] > node ./supporter.js
2020-04-10T08:43:04.221Z [out] 
2020-04-10T08:43:06.338Z [err] npm
2020-04-10T08:43:06.339Z [err]  WARN node-red-project@0.0.1 No repository field.
2020-04-10T08:43:06.339Z [err] npm 
2020-04-10T08:43:06.339Z [err] WARN node-red-project@0.0.1 No license field.
2020-04-10T08:43:06.340Z [err] 
2020-04-10T08:43:06.373Z [err] npm
2020-04-10T08:43:06.373Z [err]  ERR! code EUIDLOOKUP
2020-04-10T08:43:06.374Z [err] npm
2020-04-10T08:43:06.374Z [err]  ERR! lifecycle User identifier does not exist: rootcd
2020-04-10T08:43:06.374Z [err] npm ERR!
2020-04-10T08:43:06.375Z [err]  
2020-04-10T08:43:06.375Z [err] npm ERR!
2020-04-10T08:43:06.375Z [err]  Failed to look up the user/group for running scripts.
2020-04-10T08:43:06.375Z [err] npm ERR!
2020-04-10T08:43:06.375Z [err]  
2020-04-10T08:43:06.375Z [err] npm ERR!
2020-04-10T08:43:06.376Z [err]  Try again with a different --user or --group settings, or
2020-04-10T08:43:06.376Z [err] npm ERR! run with --unsafe-perm to execute scripts as root.
2020-04-10T08:43:06.420Z [err] 
2020-04-10T08:43:06.420Z [err] npm ERR! A complete log of this run can be found in:
2020-04-10T08:43:06.420Z [err] npm ERR!
2020-04-10T08:43:06.421Z [err]      /root/.npm/_logs/2020-04-10T08_43_06_399Z-debug.log
2020-04-10T08:43:06.446Z rc=1

What do you expect to happen?

Update as normal

Please tell us about your environment:

  • Node-RED version: 1.0.5
  • Node.js version: 12.16.2
  • npm version: 6.14.4
  • Platform/OS: Armbian buster 20.02.1
  • Browser: Firefox 75.0 (Win)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
dceejaycommented, Apr 14, 2020

That is the setting option for npm . As we said running as root is not recommended for the majority of users, and running it that way can cause issues. I’m going to close the issue here as we can look to mitigate this in the install script for linux users, rather than have the core need to care about user privileges.

1reaction
dceejaycommented, Apr 14, 2020

if you are running as root then probably yes…

npm config set unsafe-perm true

then restart and retry the update.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting Firmware - Update Incomplete
If you've tried to update Palette's firmware and received an error code, first power off and power on your Palette, restart the Firmware...
Read more >
Known Palette 3 Issues and Available Troubleshooting
1. Update your Palette's firmware to the latest release. Recent releases can be found here. · 2. Conduct a factory reset of your...
Read more >
Mosaic Palette Users | Trying to update firmware and I can't ...
Trying to update firmware and I can't find much info on this error: "Port is not open" , any thoughts ... Settings: Splice...
Read more >
Cannot update linked tools in a catalog in AutoCAD ...
Right-click the tool and select "Properties...". · Check the "Refresh from:" box, then OK. · Right-click the tool palette and select "Properties..
Read more >
Failed to update a palette - General - Node-RED Forum
I am trying to update the palette node-red-contrib-home-assistant-websocket from 0.37.8 to 0.30.1. Unfortunately I got this error:
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found