1、打開cmd命令窗口,windows鍵+R,輸入cmd確認,打開cmd窗口之后,輸入node -v命令,先查看下當前nodejs的版本
2、如果上面查看的版本比較低,則可以開始升級
清除npm cache
3、升級之前還需要安裝n模塊,n模塊是專門用來管理nodejs的版本
輸入npm install -g n
4、如果出現npm ERR! notsup Unsupported platfor... npm ERR! notsup Valid OS: !win32這樣錯誤信息,則可以在命令后面加上 --force
5、如果你想升級到一個指定的版本,則可以使用n 6.11.2來升級
6、還可以直接輸入n stable,升級到nodejs最新穩定的版本
1、安裝插件
npm install --save qrcode
2、卸載插件
npm uninstall qrcode
# 全局安裝 vue-cli $ cnpm install --global vue-cli # 創建一個基於 webpack 模板的新項目 $ vue init webpack my-project # 這里需要進行一些配置,默認回車即可 This will install Vue 2.x version of the template. For Vue 1.x use: vue init webpack#1.0 my-project ? Project name my-project ? Project description A Vue.js project ? Author runoob <test@runoob.com> ? Vue build standalone ? Use ESLint to lint your code? Yes ? Pick an ESLint preset Standard ? Setup unit tests with Karma + Mocha? Yes ? Setup e2e tests with Nightwatch? Yes
vue 安裝卸載
- 安裝最新版本
npm install -g @vue/cli
或
yarn global add @vue/cli
- 卸載之前版本
npm uninstall vue-cli -g
或
yarn global remove vue-cli
- 查看
vue --version
或
vue -V