安装时注意
官网直接下载就行
注意
安装时候切记勾选这个选项
automatically install the necessary…
大致意思是提示你是否需要自动安装nmp模块需要的环境,如果此时不安装nmp模块需要依赖的环境,后面可以点击网址手动进行安装。
弹出来的poweshell等待的时间很长,大概半小时左右
vue创建web项目
D:\project\wiki>vue --version
@vue/cli 4.5.9
D:\project\wiki>vue create web
Vue CLI v4.5.9
┌──────────────────────────────────────────┐
│ │
│ New version available 4.5.9 → 4.5.15 │
│ Run npm i -g @vue/cli to update! │
│ │
└──────────────────────────────────────────┘
? Please pick a preset: Manually select features
? Check the features needed for your project: Choose Vue version, Babel, TS, Router, Vuex, Linter
? Choose a version of Vue.js that you want to start the project with 3.x (Preview)
? Use class-style component syntax? No
? Use Babel alongside TypeScript (required for modern mode, auto-detected polyfills, transpiling JSX)? No
? Use history mode for router? (Requires proper server setup for index fallback in production) Yes
? Pick a linter / formatter config: Basic
? Pick additional lint features: Lint on save
? Where do you prefer placing config for Babel, ESLint, etc.? In dedicated config files
? Save this as a preset for future projects? Yes
? Save preset as: wiki
� Preset wiki saved in C:\Users\cause\.vuerc
Vue CLI v4.5.9
✨ Creating project in D:\project\wiki\web.
⚙️ Installing CLI plugins. This might take a while...
added 1208 packages in 34s
14 packages are looking for funding
run `npm fund` for details
� Invoking generators...
� Installing additional dependencies...
added 123 packages in 9s
22 packages are looking for funding
run `npm fund` for details
⚓ Running completion hooks...
� Generating README.md...
� Successfully created project web.
� Get started with the following commands:
$ cd web
$ npm run serve
D:\project\wiki>cd web
D:\project\wiki\web>npm run serve
> web@0.1.0 serve
> vue-cli-service serve
INFO Starting development server...
98% after emitting CopyPlugin
DONE Compiled successfully in 2995ms 下午5:15:11
App running at:
- Local: http://localhost:8080/
- Network: http://10.0.0.60:8080/
Note that the development build is not optimized.
To create a production build, run npm run build.
No issues found.
vue启动项目
Microsoft Windows [版本 10.0.18362.535]
(c) 2019 Microsoft Corporation。保留所有权利。
D:\project\wiki>vue --version
@vue/cli 4.5.9
D:\project\wiki>cd web
D:\project\wiki\web>npm run serve
> web@0.1.0 serve
> vue-cli-service serve
INFO Starting development server...
98% after emitting CopyPlugin
DONE Compiled successfully in 1394ms 下午3:01:33
App running at:
- Local: http://localhost:8080/
- Network: http://10.0.0.60:8080/
Note that the development build is not optimized.
To create a production build, run npm run build.
Issues checking in progress...
No issues found.
如果这篇文章没帮助到你,欢迎留言~