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,創建成功如下界面