1、官网安装下载安装nodejs
2、安装完成后,通过命令查看版本,可以查看到版本
node -v
npm -v
3、安装Vue CLi
npm install -g @vue/cli
4、创建项目,vue create test
如果遇到报错:
ERROR Error: spawn yarn ENOENT Error: spawn yarn ENOENT at ChildProcess._handle.onexit (node:internal/child_process:286:19) at onErrorNT (node:internal/child_process:484:16) at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
需要安装yarn
npm install -g yarn
再次创建项目,报错如下
info Visit
https://yarnpkg.com/en/docs/cli/install
for documentation about this command. error Error: certificate has expired at TLSSocket.onConnectSecure (node:_tls_wrap:1674:34) at TLSSocket.emit (node:events:519:28) at TLSSocket._finishInit (node:_tls_wrap:1085:8) at ssl.onhandshakedone (node:_tls_wrap:871:12) info There appears to be trouble with your network connection. Retrying...
忽略ssl验证
yarn config set "strict-ssl" false
重新创建项目,vue create test,创建成功如下界面