# Can not install a module

**URL:** <https://discourse.nodered.org/t/can-not-install-a-module/4169>\
**Category:** General\
**Created:** [21 October 2018 11:17 UTC](https://discourse.nodered.org/t/can-not-install-a-module/4169 "2018-10-21T11:17:41Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Luc](https://avatars.discourse-cdn.com/v4/letter/l/9dc877/32.png) [@Luc](https://discourse.nodered.org/u/Luc)\
**Post date:** [21 October 2018 11:17 UTC](https://discourse.nodered.org/t/can-not-install-a-module/4169/1 "2018-10-21T11:17:41Z")

</div>

Hello  
I have an error in module installation but how to get around it?

(node: 1916) [DEP0022] DeprecationWarning: os.tmpDir () is deprecated. Use os.tmpdir () instead.

Precision: I'm on RPI3 and Debian 9 Stretch

Thank you for your help

Luc

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [21 October 2018 11:47 UTC](https://discourse.nodered.org/t/can-not-install-a-module/4169/2 "2018-10-21T11:47:54Z")

</div>

What version of nodejs, node-red and npm are you using?

---

<div class="post-metadata">

**Author:** ![Luc](https://avatars.discourse-cdn.com/v4/letter/l/9dc877/32.png) [@Luc](https://discourse.nodered.org/u/Luc)\
**Post date:** [21 October 2018 12:04 UTC](https://discourse.nodered.org/t/can-not-install-a-module/4169/3 "2018-10-21T12:04:08Z")

</div>

Hello

Node-RED: v0.19.3  
Version Node.js: v8.11.1  
Npm: 1.4.21

An upgrade of npm does not work I always have the same error

"(node: 1559) [DEP0022] DeprecationWarning: os.tmpDir () is deprecated. Use os.tmpdir () instead."

Thank for help

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [21 October 2018 12:10 UTC](https://discourse.nodered.org/t/can-not-install-a-module/4169/4 "2018-10-21T12:10:00Z")

</div>

your version of npm is too old.

If this is on a raspberry pi, it is worth updating using the script in the docs.

Otherwise just update npm

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [21 October 2018 12:10 UTC](https://discourse.nodered.org/t/can-not-install-a-module/4169/5 "2018-10-21T12:10:23Z")

</div>

So if you have updated npm what version are you now on?

---

<div class="post-metadata">

**Author:** ![Luc](https://avatars.discourse-cdn.com/v4/letter/l/9dc877/32.png) [@Luc](https://discourse.nodered.org/u/Luc)\
**Post date:** [21 October 2018 12:12 UTC](https://discourse.nodered.org/t/can-not-install-a-module/4169/6 "2018-10-21T12:12:41Z")

</div>

Hey no, he does not get up to date precisely, I have the same mistake.

... Upgrading from node-red to 19.4 instead of .19.3

---

<div class="post-metadata">

**Author:** ![Luc](https://avatars.discourse-cdn.com/v4/letter/l/9dc877/32.png) [@Luc](https://discourse.nodered.org/u/Luc)\
**Post date:** [21 October 2018 12:27 UTC](https://discourse.nodered.org/t/can-not-install-a-module/4169/7 "2018-10-21T12:27:49Z")

</div>

That's what shows me when installing the module

Oct 21 14:24:55 - [warn] (node: 2287) [DEP0022] DeprecationWarning: os.tmpDir () is deprecated. Use os.tmpdir () instead.  
npm ERR! Error: unable to get local issuer certificate  
npm ERR! at TLSSocket. (\_tls\_wrap.js: 1105: 38)  
npm ERR! at emitNone (events.js: 106: 13)  
npm ERR! at TLSSocket.emit (events.js: 208: 7)  
npm ERR! at TLSSocket.\_finishInit (\_tls\_wrap.js: 639: 8)  
npm ERR! at TLSWrap.ssl.onhandshakedone (\_tls\_wrap.js: 469: 38)  
npm ERR! If you need help, you can report this \* entire \* log,  
npm ERR! including the npm and node versions, at:  
npm ERR! [Http://github.com/npm/npm/issues](Http://github.com/npm/npm/issues)

npm ERR! System Linux 4.14.71-v7 +  
npm ERR! command "/ usr / bin / node" "/ usr / bin / npm" "install" "--save" "--save-prefix = ~" "--production" "node-red-dashboard@2.9.8"  
npm ERR! cwd /root/.node-red  
npm ERR! node -v v8.11.1  
npm ERR! npm -v 1.4.21  
npm ERR! UNABLE\_TO\_GET\_ISSUER\_CERT\_LOCALLY code  
npm ERR!  
npm ERR! Additional logging details can be found in:  
npm ERR! /root/.node-red/npm-debug.log  
npm ERR! not ok code 0

21 Oct 14:24:55 - [warn] --------------------------------------- ---

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [21 October 2018 12:28 UTC](https://discourse.nodered.org/t/can-not-install-a-module/4169/8 "2018-10-21T12:28:35Z")

</div>

> [@Luc](#):
>
> node-red to 19.4 instead of .19.3

That is upgrading Node-RED itself. Please tell us what version of NodeJS and npm you are using.

From a command line, run:

```auto
node --version && npm --version

```

---

<div class="post-metadata">

**Author:** ![Luc](https://avatars.discourse-cdn.com/v4/letter/l/9dc877/32.png) [@Luc](https://discourse.nodered.org/u/Luc)\
**Post date:** [21 October 2018 12:33 UTC](https://discourse.nodered.org/t/can-not-install-a-module/4169/9 "2018-10-21T12:33:50Z")

</div>

node --version && npm --version  
v8.11.1  
1.4.21  
(node:2601) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [21 October 2018 12:39 UTC](https://discourse.nodered.org/t/can-not-install-a-module/4169/10 "2018-10-21T12:39:47Z")

</div>

That is the same version you listed in your second post.

You then say "An upgrade of npm does not work I always have the same error"

npm v1 is too old. You need at least npm v2

---

<div class="post-metadata">

**Author:** ![Luc](https://avatars.discourse-cdn.com/v4/letter/l/9dc877/32.png) [@Luc](https://discourse.nodered.org/u/Luc)\
**Post date:** [21 October 2018 12:42 UTC](https://discourse.nodered.org/t/can-not-install-a-module/4169/11 "2018-10-21T12:42:17Z")

</div>

Ok i'm looking at the site here for the way to upgrade but surely i'm doing it wrong

Do you have the right command line?

Thanks again for the attention

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [21 October 2018 12:45 UTC](https://discourse.nodered.org/t/can-not-install-a-module/4169/12 "2018-10-21T12:45:13Z")

</div>

> [@Luc](#):
>
> Ok J'ai regarder sure le site ici pour la façon de mettre à niveau mais surement que je m'y prend mal
> 
> Avez-vous la bonne ligne de commande ?
> 
> Merci encore pour l'attention

Cela dépend de l'ordinateur que vous utilisez

---

<div class="post-metadata">

**Author:** ![Luc](https://avatars.discourse-cdn.com/v4/letter/l/9dc877/32.png) [@Luc](https://discourse.nodered.org/u/Luc)\
**Post date:** [21 October 2018 12:46 UTC](https://discourse.nodered.org/t/can-not-install-a-module/4169/13 "2018-10-21T12:46:06Z")

</div>

Linux Debian 9 stretch in RPI3.

Testing "Sudo npm outdated" is not good

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [21 October 2018 12:47 UTC](https://discourse.nodered.org/t/can-not-install-a-module/4169/14 "2018-10-21T12:47:20Z")

</div>

Ensuite, utilisez le script dans la documentation.

> [@Can not install a module](https://discourse.nodered.org/t/can-not-install-a-module/4169/4):
>
> your version of npm is too old. If this is on a raspberry pi, it is worth updating using the script in the docs. Otherwise just update npm

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [21 October 2018 12:48 UTC](https://discourse.nodered.org/t/can-not-install-a-module/4169/15 "2018-10-21T12:48:09Z")

</div>

If you are using a standard installation of Node-RED. Run Dave's upgrade script - see the Node-RED docs. That will upgrade node & npm to the right versions.

---

<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:** [21 October 2018 12:54 UTC](https://discourse.nodered.org/t/can-not-install-a-module/4169/16 "2018-10-21T12:54:45Z")

</div>

> [@Luc](#):
>
> I'm on RPI3 and Debian 9 Stretch

Since you are using Debian Stretch the upgrade script should work ok as Raspbian is based on that.  
[https://nodered.org/docs/hardware/raspberrypi](https://nodered.org/docs/hardware/raspberrypi)

---

<div class="post-metadata">

**Author:** ![Luc](https://avatars.discourse-cdn.com/v4/letter/l/9dc877/32.png) [@Luc](https://discourse.nodered.org/u/Luc)\
**Post date:** [21 October 2018 13:06 UTC](https://discourse.nodered.org/t/can-not-install-a-module/4169/17 "2018-10-21T13:06:29Z")

</div>

Always the same problem.  
How can I completely destroy node-red and reinstall it properly?

I think going back to a clean node-red might be better ... no?

---

<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:** [21 October 2018 13:14 UTC](https://discourse.nodered.org/t/can-not-install-a-module/4169/18 "2018-10-21T13:14:26Z")

</div>

Running the script usually recovers the situation. What happens when you run the script? If it fails then post /var/log/nodered-install.log here.

---

<div class="post-metadata">

**Author:** ![Luc](https://avatars.discourse-cdn.com/v4/letter/l/9dc877/32.png) [@Luc](https://discourse.nodered.org/u/Luc)\
**Post date:** [21 October 2018 13:20 UTC](https://discourse.nodered.org/t/can-not-install-a-module/4169/19 "2018-10-21T13:20:18Z")

</div>

I do not have a node-red log file in / var / logs /

concerns of node-red in itself but modules.  
I have an error when installing these

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [21 October 2018 13:53 UTC](https://discourse.nodered.org/t/can-not-install-a-module/4169/20 "2018-10-21T13:53:02Z")

</div>

So what is the exact command you are running?  
What does it display?

Or just start with a brand new install of Stretch on the sd card

[Next page](https://discourse.nodered.org/t/can-not-install-a-module/4169.md?page=2)
