Pit in vue3.0 upgrade and correct posture for upgrade

1. The version of node should not be too low. The 11.x I used before was upgraded according to the official document

vue upgrade --next

Prompt me that the npm version is too low and needs to be upgraded

2. Install after upgrade

npm install -g @vue/cli

If the node version uses the latest version 16.3.0, an error will be reported.应该使用最新版稳定版14.17.1
insert image description here

correct upgrade posture

 1. nvm install 14.17.1
 2. nvm use 14.17.1
 3. npm install -g @vue/cli
 4. vue upgrade --next
 5. npm init @vitejs/app <你的项目文件夹 如果直接当前文件夹那么写`npm init @vitejs/app .`>
 6. npm install
 7. npm run dev

incomplete,,,

Guess you like

Origin blog.csdn.net/weixin_44441196/article/details/118105051
Recommended