简体   繁体   English

更新后,我仍然有旧版本的Node.js

[英]After a update, I still have an old version of Node.js

I have to update my local Node.js so that one of my webpack application can be deployed to Google Cloud. 我必须更新本地Node.js,以便将其中一个Webpack应用程序部署到Google Cloud。 After running the following set of commands, I get an error 'sudo: n: command not found'. 运行以下命令集后,出现错误“ sudo:n:找不到命令”。

sudo npm cache clean -f
sudo npm install -g n
sudo n stable

Based on this article , I run the following command 根据本文 ,我运行以下命令

~ $  sudo -E env "PATH=$PATH" n stable

 install : node-v8.2.1
   mkdir : /usr/local/n/versions/node/8.2.1
   fetch : https://nodejs.org/dist/v8.2.1/node-v8.2.1-linux-x64.tar.gz ######################################################################## 100.0%
 installed : v8.2.1

The latest version of Node.js shall be installed. 应安装最新版本的Node.js。 However, I still get 但是,我仍然得到

node -v
v6.10.0

How to solve this installation problem on Linx Mint 18.1? 如何解决Linx Mint 18.1上的安装问题?

type n and choose node/8.2.1 输入n并选择node / 8.2.1

if you wanna remove old version 如果您想删除旧版本

type n rm 6.10.0 类型n rm 6.10.0

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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