vue打包部署到服务器点击菜单页面空白的原因

本地编译项目时使用:cnpm
打包项目使用:npm

cnpmnpm的版本不一致,或一个高版本一个低版本,则会出现页面空白。
检查本地cnpmnpm的版本

npm升级命令

更新到最新版本
npm install -g npm

指定版本更新
npm -g install npm@6.14.10
#备忘
#npm查看源
npm config get registry
#npm 安装cnpm淘宝镜像
npm install -g cnpm --registry=https://registry.npm.taobao.org
#改为官方镜像源
npm config set registry https://registry.npmjs.org/
#改为淘宝镜像源
npm config set registry http://registry.npm.taobao.org/
posted @ 2021-07-14 17:03  kanie_life  阅读(262)  评论(0编辑  收藏  举报