1.node安装包,版本号为12.16.2
node-v12.16.2-x64.msi
node安装教程链接:https://blog.csdn.net/antma/article/details/86104068
2.本地使用visual studio code启动vue静态项目
2.1.修改config里面的index.js文件,将local.oudianyun.com替换为127.0.0.1
2.2.修改src/config里面的index.json文件:
"BASE_API": "http://aceda022ni07.aldi.com.cn",
"WEB_URL": "http://aceda022ni02.aldi.com.cn"
2.3运行项目
2.3.1安装依赖
在visual studio code 里面的terminal中输入命令
npm install
如果很慢可以使用命令
npm install --registry=https://registry.npm.taobao.org
2.3.2启动服务
npm run dev
启动完后后访问http://127.0.0.1:9528即可,目前启动完后是会自动开启浏览器跳转到改地址
3.常见错误和解决方案
3.1.fatal: unable to look up github.com
npm cache clean --force
3.2.bower error status code of git: 128
git config --global url."https://".insteadOf git://