基本环境搭建

2018-12-09  本文已影响0人  mldonkey

安装Node.js和npm

首先,从Node.js官网下载对应平台的安装程序,在Windows上安装时务必选择全部组件,包括勾选Add to Path,npm已经在Node.js安装的时候顺带装好了.

C:\Users\Hugo>node -v

v10.14.1

C:\Users\Hugo>npm -v

6.4.1

安装Yarn

C:\Users\Hugo>npm install -g yarn

C:\Users\Hugo>yarn -v

1.12.3

安装vue-cli

C:\Users\Hugo>yarn global add vue-cli

vue命令还无法使用,需要进行path配置

C:\Users\Hugo>yarn global dir

C:\Users\Hugo\AppData\Local\Yarn\Data\global

C:\Users\Hugo\AppData\Local\Yarn\bin加入path

就可以使用vue命令了

C:\Users\Hugo>vue

Usage: vue <command> [options]

Options:

  -V, --version  output the version number

  -h, --help    output usage information

Commands:

  init          generate a new project from a template

  list          list available official templates

  build          prototype a new project

  create        (for v3 warning only)

  help [cmd]    display help for [cmd]

上一篇 下一篇

猜你喜欢

热点阅读