In the last two posts, node. js, Webpack, vue-cli are installed, and the installed version is:
Create a project today through this blog post.
1. Select a path
Start by entering the path to the project you want to create from the command line, for example:
Through the E: command to enter the disk, and then through the CD command to enter the folder.
2. Create a project
Through the command Vue Init webpack pm, where PM is the project name for you to create the project, after executing the command vue-cli will download the template and then set the project information:
- Set the project name
- ? Project name PMText
- Set Item description
- ? Project Description Intracompany
- Author
- ? Author Hys
- ? Vue Build (usearrow keys)
- ? Vue Build standalone
- Set up routes
- ? Install vue-router? Yes
- ? Use ESLint to lint your code? No
- Unit Test
- ? Set up unit tests Yes
- ? Pick a test runner jest
- ? Setup e2e tests with Nightwatch? Yes
- ? Should we run ' npm install ' for your after the project have been created? (Recom
- ? Should we run ' npm install ' for your after the project have been created? (Recom
- ? Should we run ' npm install ' for your after the project have been created? (Recom
- ? Should we run ' npm install ' for your after the project have been created? (Recom
- mended) No ( should be selected here)
- VUE-CLI Generated "PMText".
- # Project Initialization finished!
- # ========================
- to get started:
- Prompt for next action
- Go to PMText folder
- CD PMText
- Initialize Project
- NPM Install (or if using Yarn:yarn)
- Run the project
- NPM Run Dev
After executing the above content, all the contents of the project are completed, and the project is opened by the link.
Bug
If you are executing:
Vue Init webpack pm is stuck , stating that there is a problem with the version of node. JS, try another stable version, that resolves the issue.
Error:
- 39365 Error code Elifecycle
- 39366 Error errno 1
- 39367 error [email protected] install: ' node install.js '
- 39367 Error Exit status 1
- 39368 Error Failed at the [email protected]2.38. 3 install script.
- 39368 error probably not a problem with NPM. There is likely additional logging output above.
Resolve Links
install chromedriver --chromedriver_cdnurl=http://cdn.npm.taobao.org/dist/chromedriver
51.webpack Vue-cli Creating a project