Installing new nodes, problems doing in and problems with what I have written down as THE way to do it

And again I am reminded of this.

I reply with:

If we shouldn't run that command, why does the program ..... offer it as a solution?

I would not have done it if not prompted to by the program I just ran to fix/install/resolve a module problem.

If you run

npm config set audit=false

Then hopefully in future it won't run the audit and won't give you those messages that tempted you into trying to "fix" things.
(You also wouldn't see it if you use the palette manager method to install)

1 Like

Though that may have been in the list of things shown to me, maybe the npm config set audit=false should be before the other?

(I don't like always saying: I'm sorry, but I do forget things.)

I hope that I will remember this, but with all the other fun things happening just now I hope you can at least appreciate I am going to forget things.

You should only have to run npm-config once on each machine.
The problem will come when you miss one machine :slight_smile:

Note that it is not node-red that is saying that, it is npm (which is just a tool used by node-red). There are a number of things I also don't like about npm but there is not much we can do about it here. For example the way it removes nodes it thinks you don't need any more without warning you first. It can't give that message till the end of the install as it doesn't know whether it needs to till after it has finished the other stuff.

(Oh no! I see Nic is replying. I'm in deep do-do now!)

Again: Some of the problems can be put to me forgetting things.

That is why I write down the important stuff as best I can.

It seems I am still not perfect at that either.

I just hope it does get better as time goes by.

This and the Arduino problems/programs I am writing I am tripping over my feet between the two worlds with syntax and stuff with which I am still not proficient.

But I hope I am getting better.

Hi @Trying_to_learn

lots of the replies here are telling you to avoid running npm audit fix and @dceejay has shown how you can disable the audit fix prompt. All good stuff.

But I do want to clarify why you hit the error when you ran npm audit fix. It is not because the npm audit fix command is in some way bad.

I suspect it is a remnant of when you had run sudo npm install ... in the past - leaving a directory with root-only permissions under /home/me/.npm. Without knowing what chown commands you ran and in what directory you ran them, it is entirely possible that directory was missed.

In summary:

  • you've successfully raised an issue against node-red-contrib-ui-media for the TypeError: Cannot read property 'projects' of undefined (line:29) error.
  • you've been given a way to disable the audit check so it doesn't tempt you.
  • the audit error you got is likely to be a remnant of previous uses of sudo - but not worth losing sleep over.

Does that address everything in this topic? If so, maybe best we close it.

1 Like

I get npm-config: command not found for that. I see there is an npm config set ... command, but haven't managed to find the right incantation.

I really hope that was fixed when you took me through it.

From that I took away the don't use sudo part.
Alas I didn't include the do not used npm audit-fix.

But now I have the new command ( npm config set audit=false) I hope that will fix any future problems.

Yes, thanks again.

I do appreciate your help.
And others too.
It is just (no offence to others) I need to try to limit the people from whom I take advice otherwise I can get conflicts with different people's take on something.

DCJay, thanks too.

I really hope it is now resolved.

Apologies (was on phone) - the correct command is

npm config set audit=false

I have corrected all posts above.

1 Like

You are allowed to make mistakes.

:smile:

1 Like

That's great, thanks.