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

**URL:** <https://discourse.nodered.org/t/installing-new-nodes-problems-doing-in-and-problems-with-what-i-have-written-down-as-the-way-to-do-it/9844>\
**Category:** General\
**Created:** [6 April 2019 22:00 UTC](https://discourse.nodered.org/t/installing-new-nodes-problems-doing-in-and-problems-with-what-i-have-written-down-as-the-way-to-do-it/9844 "2019-04-06T22:00:25Z")\
**Posts on this page:** 12\
**Page:** 2

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [7 April 2019 09:16 UTC](https://discourse.nodered.org/t/installing-new-nodes-problems-doing-in-and-problems-with-what-i-have-written-down-as-the-way-to-do-it/9844/21 "2019-04-07T09:16:04Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [7 April 2019 09:16 UTC](https://discourse.nodered.org/t/installing-new-nodes-problems-doing-in-and-problems-with-what-i-have-written-down-as-the-way-to-do-it/9844/22 "2019-04-07T09:16:58Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [7 April 2019 09:19 UTC](https://discourse.nodered.org/t/installing-new-nodes-problems-doing-in-and-problems-with-what-i-have-written-down-as-the-way-to-do-it/9844/23 "2019-04-07T09:19:44Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [7 April 2019 09:22 UTC](https://discourse.nodered.org/t/installing-new-nodes-problems-doing-in-and-problems-with-what-i-have-written-down-as-the-way-to-do-it/9844/24 "2019-04-07T09:22:27Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [7 April 2019 09:23 UTC](https://discourse.nodered.org/t/installing-new-nodes-problems-doing-in-and-problems-with-what-i-have-written-down-as-the-way-to-do-it/9844/25 "2019-04-07T09:23:19Z")

</div>

> [@Trying\_to\_learn](#):
>
> If _we shouldn't run that command_ , why does the program ..... offer it as a solution?

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.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [7 April 2019 09:27 UTC](https://discourse.nodered.org/t/installing-new-nodes-problems-doing-in-and-problems-with-what-i-have-written-down-as-the-way-to-do-it/9844/26 "2019-04-07T09:27:03Z")

</div>

(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.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [7 April 2019 09:30 UTC](https://discourse.nodered.org/t/installing-new-nodes-problems-doing-in-and-problems-with-what-i-have-written-down-as-the-way-to-do-it/9844/27 "2019-04-07T09:30:50Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [7 April 2019 09:31 UTC](https://discourse.nodered.org/t/installing-new-nodes-problems-doing-in-and-problems-with-what-i-have-written-down-as-the-way-to-do-it/9844/28 "2019-04-07T09:31:02Z")

</div>

> [@dceejay](#):
>
> npm-config --no-audit

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.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [7 April 2019 09:35 UTC](https://discourse.nodered.org/t/installing-new-nodes-problems-doing-in-and-problems-with-what-i-have-written-down-as-the-way-to-do-it/9844/29 "2019-04-07T09:35:31Z")

</div>

> [@knolleary](#):
>
> 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.

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.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [7 April 2019 09:56 UTC](https://discourse.nodered.org/t/installing-new-nodes-problems-doing-in-and-problems-with-what-i-have-written-down-as-the-way-to-do-it/9844/30 "2019-04-07T09:56:44Z")

</div>

Apologies (was on phone) - the correct command is

```
npm config set audit=false

```

I have corrected all posts above.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [7 April 2019 09:57 UTC](https://discourse.nodered.org/t/installing-new-nodes-problems-doing-in-and-problems-with-what-i-have-written-down-as-the-way-to-do-it/9844/31 "2019-04-07T09:57:26Z")

</div>

You are allowed to make mistakes.

😄

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [7 April 2019 12:21 UTC](https://discourse.nodered.org/t/installing-new-nodes-problems-doing-in-and-problems-with-what-i-have-written-down-as-the-way-to-do-it/9844/32 "2019-04-07T12:21:26Z")

</div>

That's great, thanks.

[Previous page](https://discourse.nodered.org/t/installing-new-nodes-problems-doing-in-and-problems-with-what-i-have-written-down-as-the-way-to-do-it/9844.md?page=1)
