Npm update leads to this....... "bluebird"

After installing a couple of new nodes, I get told there is a new NPM.

I install it as requested and at the end I see this message:

Saying something about permissions.
What permissions - they are all the same.
(See second grab)
Looking into "node-red bluebird" I believe it is system installed.
So what is the problem with the permissions?

Just wanting to be sure.

Screenshot%20from%202019-01-05%2017-26-36

Screenshot%20from%202019-01-05%2017-26-27

Exactly what command did you run that gave that problem?

Exactly....... I don't remember. It was now about 12 hours ago and I have since been asleep.

I was updating the nodes and I was being told there is a new version of npm, and to npm audit fix to fix problems (not going to try and spell vounrebility at this time of the day).

Perhaps this could jog your memory

1 Like

As has been advised here in the past npm audit fix is not actually a good thing to do, and it isn't what you said you had done, you said you had installed a new version of npm.

Colin,

Yes, granted, it isn't what I said was being done, but........

Installing nodes from the web page is painful at best.

So I ssh into the machine, cd .node-red and install them from the cli/terminal.

While doing this npm "complained" and said I am using an old version and there is a new version to get. *1
That took me on a slight tangent as I updated it and got it's warnings about old nodes and vounrebilities with existing nodes.
"to fix these problems do: npm audit fix, or npm audit to look at the problems"

I shall accept my stupidity and just get the problems fixed. Seeing what npm audit says would be beyond me, so it doesn't seem like a smart thing to do.

I did what was stated.
Somewhere in doing that I got the message about "permission denied with access to bluebird'.
I posted seeking information on what is/was going on.

*1
So (and I will be told again that this has been talked about before. I don't remember.) if when I use npm to install a node and npm says it should be updated....... why is this not a good thing to do?

ukmoose....

Thanks.

from the history command this is about the time when I got the error.
You can see that I went off to find this "bluebird" and read the readme file.

Though you don't see the replies (obviously) I hope this is enough information to help someone help me understand where the confusion is.

cd .node-red
npm install node-red-contrib-queue-gate
npm install node-red-contrib-simple-gate
npm install -g npm
exit
cd /usr/lib/node_modules/npm/node_modules/
ld
ll blue*
ls -l blue*
cd bluebird/
lf
cat README.md 
cd ..
ll
exit

Why? I've found it a breeze, and less likely for me to get into a mess (ahem!)

Paul,

Honestly, I don't know.

Maybe it is the recent "Node-red must be restarted" plague which seems to be true for any node updated.
Though I may be able to do multiple ones on the web page/gui thing, at the end of the day I have to reboot the machine. (Restart NR)
So if I do it from the CLI, I know which ones have done, they are done one at a time, not all at once, and when done I just reboot the machine.

Scrolling through the list, remembering which one/s are updated, blah blah..... Not fun.
I open a terminal/CLI, see the ones I want to update, update them and when done reboot/restart.

To me that is a lot easier.

I know I may cop a bit for rebooting rather than simple .....
(what is the command again?)

sudo systemctl restart node-red

or something?
A reboot makes sure it is all done. Though have to admit that is painful too. 3 minutes before NR is backup and working.

...which you should do if you update nodes the via the CLI as well...

Yes, but I am saying from the CLI, I have a "list" of nodes I want to update.
I do them one at a time, "top to bottom" and they are done.

Via the web page, the list is reset after they are updated and as NR is not restarted I don't see the last one done.

So, I sometimes end up updating the same node many times. (yeah, silly me.)
To stop that, I do it from the CLI.
Then when the list is complete, I reboot the machine.

Doing multiple nodes via the web may be ok, but it doesn't really save any time.
The poor processor is "busting its balls" updating one node, and I go and tell it to update another one too.
That just doesn't make things smooth.
I'd rather wait for one to update, then do the other.
The CLI is a clear indicator of what is going on and where things are.

Agreed, it's personal choice, but for you it's opened up a big problem, which wouldn't otherwise have occurred if you'd used the palette manager.
I hope you get it sorted.

Thanks.

I also agree..... Had I not done it this way, I would never have known. But is that a good thing or not?

I'm not saying this is the case, but I have often read that it is when you do unexpected things that you find problems.
Always going what you are told (with programs in this case) it all works nicely. It is only when you push the limits do you find new things.

I would expect the update button to not be there if you've already updated it but not yet restarted... is that not the case? If so, then that's a bug for us to fix.

I can see @Trying_to_learn 's point...

Firstly, you see that a node needs updating, so you click 'update';

1

Then the node updates;

2

...which results in...

3

..which is where we started....

BUT, restarting node-RED, of course clears the update flag.

Yup, as I said, that's a bug that needs fixing.

You are probably right. Just the "tracking" of "who is updated" is not good with the web side of things. MY PROBLEM.

So I decided to reduce the problems I would do it via the CLI.

Not to complicate the problem, but more a suggestion:

Ok, so when the node is updated (and NR is not restarted) it is still showing as needing to be updated.

Nick agrees that "it" needs to changed.

As a suggestion to middle ground:

In the list it shows it has an update available. Even after the node is updated.
When it is updated, rather than saying it is updated, mark it as updated but a restart is needed in there.
That way the use is better informed on the state of things.

Just a suggestion.

Yes, that's exactly the sort of thing I had in mind.

And sure enough, I found the small typo that was preventing the code I thought I had already written from working properly.

After an update, the entry in the list will refresh to look like this:

2 Likes

Good to hear!

Thanks.