Element ui 日期显示为中文
在main.js中加入以下代码段:
创建Vue项目报错:
Cannot read property 'indexOf' of undefined
将vue-cli进行升级 打开cmd:
npm i -g @vue/cli
报错信息
Error: Can't find Python executable "python", you can set the PYTHON env variable
执行npm install命令后,报错了,报错的信息是node-sass安装失败,同时提示需要python环境的错误信息,这是因为安装node-sass失败了,而node-sass依赖于Python环境,node-sass安装失败是因为默认是从国外线路下载,解决办法:
-
1.设置全局淘宝镜像源
npm config set sass_binary_site https://npm.taobao.org/mirrors/node-sass/
-
2.安装NODE-SASS
npm install node-sass
-
3.启动VUE项目
npm run dev