4

I went to install nodejs and npm on Debian9 like this with the root account because npm is not included in the legacy debian package :

curl -sL https://deb.nodesource.com/setup_8.x | bash -
    .../...
## Run `apt-get install nodejs` (as root) to install Node.js v8.x and npm

:~# 
:~# apt-get install -y nodejs

Now I would like to install some module with npm or to do the update of npm and I've got this error message

:~# npm cache clean -f
npm WARN using --force I sure hope you know what you are doing.

:~#  npm install -g npm
npm ERR! code ERR_INVALID_OPT_VALUE
npm ERR! The value "4294967295" is invalid for option "family"

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2018-03-29T11_17_37_357Z-debug.log

Here the link to the debug log file : Justpasteit

Thanks for any help

dubis
  • 378
  • 1
  • 7
  • 22
  • 1
    `npm install -g npm` you seem to be updating npm itself and here you don't require the flag -g – TGW Mar 29 '18 at 11:51
  • Could you read carefully. This is the command that gave me an error message thanks – dubis Mar 29 '18 at 14:19
  • That's what I said that don't use -g – TGW Mar 29 '18 at 14:26
  • with or without the "-g" I've got the same error message – dubis Apr 11 '18 at 13:54
  • can you try to re-install node and npm and then try? – TGW Apr 13 '18 at 04:52
  • @TGW I purged everything with `apt-get purge nodejs` and I removed the local hidden directories like `~/.npm`. I did again the same procedure than above and I've got the some error message. In the other way I changed the procedure I found on the web and I've got this error message : `npm ERR! Invalid argument: family must be 4 or 6` I can not install any extra package I need – dubis Apr 13 '18 at 08:05
  • hey sorry for late reply can you check the versions using npm -v and node -v – TGW Apr 17 '18 at 06:26
  • I installed Node.js v8.x as recommended for get LTS version npm version 5.6.0 and node version v8.11.1 – dubis Apr 17 '18 at 13:44
  • can you try `npm install express --loglevel info` and paste the logs here? Just make sure you use flag `loglevel info` – TGW Apr 19 '18 at 10:40
  • :~$ npm install express --loglevel info npm info it worked if it ends with ok npm info using npm@5.6.0 npm info using node@v8.11.1 npm ERR! Invalid argument: family must be 4 or 6 npm ERR! A complete log of this run can be found in: npm ERR! /home/system/.npm/_logs/2018-04-19T11_13_24_045Z-debug.log – dubis Apr 19 '18 at 11:14
  • sorry for the late reply, the logs seem to be same can you downgrade node version? – TGW Apr 30 '18 at 13:32
  • Try this helps https://npm.community/t/npm-install-g-typescript-fails-with-npm-err-the-value-false-is-invalid-for-option-readablehighwatermark/8668/4 – vimuth Jul 09 '20 at 16:36

0 Answers0