vue-cli2. 0 project startup problem handling
1、 Error report of project operation : And webpack-dev-server dependent
Method 1 、 take webpack-dev-server Uninstall and re install
npm uninstall --save-dev webpack-dev-server
npm install --save-dev webpack-dev-server@3.11.2
Method 2 、
take package.json Configuration file in , Some of the more common , With a pointed horn ’ ^ ‘ Remove the sharp corners of the ,
such as :
"element-ui": "^2.13.0",
"vue-echarts": "^4.0.3",
"vue-router": "3.0.2",
"vue-splitpane": "1.0.4",
"vue-ueditor-wrap": "^2.4.4",
"vue-ydui": "^1.2.6",
"vuedraggable": "^2.20.0", wait
Remove the sharp horn , Avoid the dependency of downloading the latest version , Cause problems in project startup
In the view config In the document index.js In file ,host Is your configuration localhost Or is it 0.0.0.0, If it is not , It’s changed to 0.0.0.0, This ensures the safety of the computer IP Access to projects
In this way, you can almost start vue 2.0 Version of the project
Read more here: Source link