vue相关
2023-03-07 本文已影响0人
墨韵
![](https://img.haomeiwen.com/i127479/8ddb540b8539e5ac.png)
![](https://img.haomeiwen.com/i127479/cf5b010d0a35a3ea.png)
![](https://img.haomeiwen.com/i127479/b3083cd3e661c03a.png)
![](https://img.haomeiwen.com/i127479/c7aa7976d6e55115.png)
# 通过nvm工具安装node和npm
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:01:25 --:--:-- 0
curl: (56) LibreSSL SSL_read: error:02FFF03C:system library:func(4095):Operation timed out, errno 60
$ ping -c 4 raw.githubusercontent.com
$ ping -c 4 github.com
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
$ source ~/.bash_profile
$ nvm install node
$ npm -v
9.5.0
# 升级npm
$ npm install -g npm@9.6.0
16 packages are looking for funding
run `npm fund` for details
# 创建工程
$ npm install -g @vue/cli
$ vue create my-project
# 🎉 Successfully created project my-project.
# 👉 Get started with the following commands:
$ cd my-project
$ npm run serve
# App running at:
# - Local: http://localhost:8080/
# - Network: http://192.168.13.14:8080/
#
# Note that the development build is not optimized.
# To create a production build, run npm run build.