简体   繁体   中英

NPM version 2 error when installed version is version 8

I have installed the latest version of NodeJS and the latest version is version 8.4.0

I tried creating a react-app but it keeps creating in version 2.

Why? How do I recify this?

Latest version of nodejs is

Latest LTS Version: 16.13.2 (includes npm 8.1.2)

According to https://nodejs.org/en/download/

This happens in linux when you try to install node with default package manager.

To fix this uninstall nodejs. Then execute the following command:

# Using Ubuntu
curl -fsSL https://deb.nodesource.com/setup_17.x | sudo -E bash -
sudo apt-get install -y nodejs

# Using Debian, as root
curl -fsSL https://deb.nodesource.com/setup_17.x | bash -
apt-get install -y nodejs

Read more here: https://github.com/nodesource/distributions/blob/master/README.md#installation-instructions

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM