走过的每一步都算数
下载
1.在gitee/GitHub上选择项目,复制地址,如:https://gitee.com/fudaosheng/Vue-NeteaseCloud-WebMusicApp.git;
2.在需要的地方创建文件夹,打开git bash命令窗,git clone https://gitee.com/fudaosheng/Vue-NeteaseCloud-WebMusicApp.git;
3.文件夹中出现下载好的项目文件。
运行
需求
运行项目,查看效果
参考链接: 如何运行一个从GITHUB下载下来的Vue项目_三翔馆主的博客-CSDN博客
1.安装依赖
npm install
2.运行
npm run serve
bugs
npm install报错
1.配置淘宝镜像
npm config set registry https://registry.npm.taobao.org/
2.删除依赖包node_modules
3.重新安装
cnpm install
参考链接: npm install报错deprecated core-js@2.6.12: core-js@<3.3 is no longer maintained_Sandra_n的博客-CSDN博客
报错Error: PostCSS plugin autoprefixer requires PostCSS 8. Migration guide for end-users:
报错原因:autoprefixer版本过高
解决方案:降低autoprefixer版本
执行:npm i postcss-loader autoprefixer@8.0.0
参考链接: Syntax Error: Error: Loading PostCSS Plugin failed: Cannot find module ‘autoprefixer‘_梦幻蔚蓝的博客-CSDN博客
npm ERR, gyp ERR报错
重新安装node,nvm
参考链接: npm ERR, gyp ERR报错_npm err! gyp err!_一零45的博客-CSDN博客
nvm的简介、安装、使用(简单明了)_仰.的博客-CSDN博客
小结
从别人仓库里面拉项目,打开是一件麻烦事,之前一直都没成功过。今天逼着自己务必要运行起来,爆了许多错,花了两个小时才成功运行。
得到一个心得,遇到报错,千万不要怂,复制粘贴找百度,谢谢广大大佬的分享,我才能一步步坚持下来,我也会坚持分享自己踩过的坑,一起排排水。