webpack-chain
vue-cli官方文档
vue安装或升级3.0
Vue cli3
安装完Vue cli3 之后,还想用vue-cli2.x 版本
nvm-cmd
- npm uninstall vue-cli -g
- npm install -g @vue/cli
- curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash
=> Appending nvm source string to /Users/xianfan/.bashrc
=> bash_completion source string already in /Users/xianfan/.bashrc
npm ERR! peer dep missing: vue@^2.5.21, required by vue-virtual-scroller@1.0.0-rc.2
npm ERR! peer dep missing: typescript@>=2.0, required by ts-node@8.1.0
npm ERR! peer dep missing: graphql@0.10.x - 14.1.x, required by apollo-tracing@0.5.2
npm ERR! peer dep missing: vue@^2.3.0, required by vue-resize@0.4.5
=> You currently have modules installed globally with `npm`. These will no
=> longer be linked to the active version of Node when you install a new node
=> with `nvm`; and they may (depending on how you construct your `$PATH`)
=> override the binaries of modules installed with `nvm`:
/usr/local/lib
├── @vue/cli@3.6.2
├── cnpm@5.1.1
├── d@1.0.0
├── gulp@3.9.1
└── webpack@3.6.0
=> If you wish to uninstall them at a later point (or re-install them under your
=> `nvm` Nodes), you can remove them from the system Node as follows:
$ nvm use system
$ npm uninstall -g a_module
=> Close and reopen your terminal to start using nvm or run the following to use it now:
export NVM_DIR="/Users/xianfan/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
- cd
- vim .bash_profile
export NVM_DIR="/Users/xianfan/.nvm"
[ -s "NVM_DIR/nvm.sh" # This loads nvm
- source .bash_profile
- nvm ls
- npm install -g @vue/cli
- vue --version
- npm install -g @vue/cli-init
- nvm current
Mand Mobile
vue create my-project #选手动可选择常用组件
cd my-project
npm install --save-dev vue-cli-plugin-mand
vue invoke mand
:style="{'background': `${item.color}`}"
/* eslint-disable no-unused-vars */
网友评论