Can not install a module

#1

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

#2

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

#3

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

#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

#5

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

#6

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

#7

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

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] --------------------------------------- ---

#8

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

From a command line, run:

node --version && npm --version
#9

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

#10

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

#11

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

#12

Cela dépend de l'ordinateur que vous utilisez

#13

Linux Debian 9 stretch in RPI3.

Testing "Sudo npm outdated" is not good

#14

Ensuite, utilisez le script dans la documentation.

#15

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.

#16

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

#17

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?

#18

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.

#19

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

#20

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