node 版本更新
由于公司要用angular构建项目,于是我就跑到官网先看看demo,怎么构建项目,执行的过程中发现了问题
问题描述
执行官网构建项目命令
- 安装脚手架工具
$ npm install -g @angular/cli
- 创建一个项目
$ ng new PROJECT-NAME
You are running version v7.6.0 of Node.js, which is not supported by Angular CLI v6.
The official Node.js version that is supported is 8.9 and greater.
Please visit https://nodejs.org/en/ to find instructions on how to update Node.js.
这时候提示我版本不支持,于是网上找了找教程,简单粗暴
node升级
1、查看当前版本
$ node -v
v8.
11.3
2、查看安装目录
$ where node
D:Program Files ool
ode.exe
- 官网下载.msi安装包 ( https://nodejs.org/en/)
- 安装到之前的安装目录
- 再次查看版本
$ node -v
v13.2.0
![](https://img2018.cnblogs.com/blog/1168330/201912/1168330-20191202102200936-223214001.png)
npm 升级
1、查看当前版本
$ npm -v
4.1.2
2、执行升级命令`npm install npm@latest -g
`
3、再次查看版本
$ npm -v
6.13.1