I installed npm
and nodejs
today because I wanted to try tldr-pages
.
After the obligatory sudo apt-get update && sudo apt-get upgrade
:
$ sudo apt-get install nodejs npm
Following a huge download of "stuff", which concluded successfully, I tried installing my objective app:
$ npm install -g tldr
This was immediately followed by a strange warning:
npm WARN npm npm does not support Node.js v10.23.1
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.
Taken literally, the WARNING is nonsense as it says: 1) your version of nodejs
is not supported & should be upgraded, and 2) supported releases are only older versions!
I know nothing about npm
and nodejs
. Is this a problem with RPi's repo - or is this a reflection of the state of these apps? Is there a known resolution for this?
-
1I normally get around this by using nvmSteve Robillard– Steve Robillard2021年01月18日 00:01:40 +00:00Commented Jan 18, 2021 at 0:01
-
1raspberrypi.org/forums/viewtopic.php?t=245989Steve Robillard– Steve Robillard2021年01月18日 00:22:16 +00:00Commented Jan 18, 2021 at 0:22
-
@SteveRobillard: A bit of helter-skelter? :)Seamus– Seamus2021年01月18日 00:47:14 +00:00Commented Jan 18, 2021 at 0:47
1 Answer 1
Packaged on debian based distribution:
sudo apt install tldr
With npm
:
Install a supported nodejs version:
curl -sL https://deb.nodesource.com/setup_current.x | sudo bash -
sudo apt install nodejs
Then run:
sudo npm install npm@latest -g
sudo npm install tldr -g
npm WARN npm npm does not support Node.js v10.23.1 npm WARN npm You should probably upgrade to a newer version of node ...
You need to upgrade npm
:
sudo npm install npm@latest -g
-
sudo apt install tldr
... I saw that, but the reference to Haskell inapt-cache search tldr
threw me off as I thought it was tldr specific to Haskell :)Seamus– Seamus2021年01月18日 02:33:24 +00:00Commented Jan 18, 2021 at 2:33