忘记node.js是如何安装的,找到了这个方法。
1.查看本机node.js版本
node -v2.清除node.js的cache
sudo npm cache clean -f3.安装 n 工具,这个工具是专门用来管理node.js版本的,别怀疑这个工具的名字,是他是他就是他,他的名字就是 “n”
sudo npm install -g n4.安装最新版本的node.js
sudo n stable5.再次查看本机的node.js版本
node -v忘记node.js是如何安装的,找到了这个方法。
1.查看本机node.js版本
node -v2.清除node.js的cache
sudo npm cache clean -f3.安装 n 工具,这个工具是专门用来管理node.js版本的,别怀疑这个工具的名字,是他是他就是他,他的名字就是 “n”
sudo npm install -g n4.安装最新版本的node.js
sudo n stable5.再次查看本机的node.js版本
node -vWe use cookies to improve your experience on our site. By using our site, you consent to cookies.
Manage your cookie preferences below:
Essential cookies enable basic functions and are necessary for the proper function of the website.
These cookies are needed for adding comments on this website.
Statistics cookies collect information anonymously. This information helps us understand how visitors use our website.
Google Analytics is a powerful tool that tracks and analyzes website traffic for informed marketing decisions.
Service URL: policies.google.com (opens in a new window)
You can find more information in our Cookie Policy and Privacy Policy.