下载vue-element-admin文件,最直接解决报错的方法

       我知道更换版本很麻烦,我之前也尝试过很多除了修改版本之外的方法,结果是改改这个修修那个,花了三天的时间还是屈服了,一劳永逸更换旧的版本,欢迎大家经历过各种报错后再回来看这篇文章,点一下收藏,不然就找不到了。

   能克隆成功的前提是涉及到了node.js,VScode,git命令的使用,python环境  下面将比较详细的介绍各个般的的协调匹配。

    之前我也是找了很多文章,但是没有成功,当你修改完这些安装环境后,就可以按照官网上的命令挨个的执行了,没有一点问题,亲测有效。

而且一点也没报错,也不用像其他博主那样修改这个修改那个了。

 vue-element-admin压缩包的链接地址是https://download.csdn.net/download/qq_61920297/87192419

1.1

    在我的主页上有从官网     介绍 | vue-element-admin上下载好的vue-element-admin文件压缩包

vue-element-admin完整版的(内有node-modules)开箱即用,可以直接 npm run dev, vue-element-admin压缩包的链接地址是https://download.csdn.net/download/qq_61920297/87192419

第一个就是,不用花钱先别着急下载,请向下阅读配置环境,不然会运行时报各种稀奇古怪的bug)

配置好环境后直接按照官网上的命令来一点也没报错,千万要注意配置环境!!!!!

首先声明,博主也是踩了很多坑,最终花费了三天的空余时间git到这个完整版的前端参考文件,适合做课程设计,快速开发中级企业网站,另外的文章上也有详细的安装说明,比较适用于对电脑熟悉的朋友使用,其中也嵌套有其他博主的论文,这里是个压缩包,可在vscode等多种前端开发软件中使用,在我的GitHub账户上也能获取。

1.2

先看一下效果:

2.1.1  处理node.js版本

      我这里使用的mvn版本是1.1.10,好像低版本的也会报错,node版本如果大于17.0.0,好像会在执行运行命令 npm run dev时会报错,所以建议使用node.js版本是16.0.0。

   发表这篇文章的目的也是为了自己以后能用到,希望也能给大家来带一定的帮助。

这里建议使用使用nvm管理切换node版本,mvn的安装有很多教程,请参考连接:

多个Node.js版本之间切换 - 博客码农 - 博客园

Microsoft Windows [版本 10.0.19043.2251]
(c) Microsoft Corporation。保留所有权利。

C:\Users\联想>nvm -V

Running version 1.1.10.

Usage:

  nvm arch                     : Show if node is running in 32 or 64 bit mode.
  nvm current                  : Display active version.
  nvm install <version> [arch] : The version can be a specific version, "latest" for the latest current version, or "lts" for the
                                 most recent LTS version. Optionally specify whether to install the 32 or 64 bit version (defaults
                                 to system arch). Set [arch] to "all" to install 32 AND 64 bit versions.
                                 Add --insecure to the end of this command to bypass SSL validation of the remote download server.
  nvm list [available]         : List the node.js installations. Type "available" at the end to see what can be installed. Aliased as ls.
  nvm on                       : Enable node.js version management.
  nvm off                      : Disable node.js version management.
  nvm proxy [url]              : Set a proxy to use for downloads. Leave [url] blank to see the current proxy.
                                 Set [url] to "none" to remove the proxy.
  nvm node_mirror [url]        : Set the node mirror. Defaults to https://nodejs.org/dist/. Leave [url] blank to use default url.
  nvm npm_mirror [url]         : Set the npm mirror. Defaults to https://github.com/npm/cli/archive/. Leave [url] blank to default url.
  nvm uninstall <version>      : The version must be a specific version.
  nvm use [version] [arch]     : Switch to use the specified version. Optionally use "latest", "lts", or "newest".
                                 "newest" is the latest installed version. Optionally specify 32/64bit architecture.
                                 nvm use <arch> will continue using the selected version, but switch to 32/64 bit mode.
  nvm root [path]              : Set the directory where nvm should store different versions of node.js.
                                 If <path> is not set, the current root will be displayed.
  nvm [--]version              : Displays the current running version of nvm for Windows. Aliased as v.


C:\Users\联想>nvm ls

    17.7.2
  * 16.0.0 (Currently using 64-bit executable)

C:\Users\联想>

达到这一步算是把node.js版本切换给更明白了。    

2.1.2

建议使用python2.7以上版本,千万不要使用python3.0以上版本,因为有些框架下载不成功,

如果使用过低的版本在VScode和pycharm 中配置多环境版本时没办法识别

npm install 命令   要运行在python 2.x.x版本上,因为它不解析python 3.x.x版本

当然还需要配置可以切换的python 版本

配置方法见连接:

Windows系统中Python多版本环境配置 - 知乎

C:\Users\联想>python22 -V
Python 2.2

C:\Users\联想>python27 -V
Python 2.7.8

C:\Users\联想>python39 -V
Python 3.9.7

C:\Users\联想>

   2.1.3

关于git命令的使用以及配置远程GitHub仓库建议参考哔哩哔哩视频,:

7.git的下载与安装_哔哩哔哩_bilibili

如果git命令报错可以参考我的原创解决方案

CSDNhttps://mp.csdn.net/mp_blog/creation/editor/128065739

3.1.0

当你修改完这些安装环境后,就可以按照官网上的命令挨个的执行了,没有一点问题,亲测有效。

而且一点也没报错,也不用像其他博主那样修改这个修改那个了。

# 克隆项目
git clone https://github.com/PanJiaChen/vue-element-admin.git

# 进入项目目录
cd vue-element-admin

# 安装依赖
npm install

# 建议不要用 cnpm 安装 会有各种诡异的bug 可以通过如下操作解决 npm 下载速度慢的问题
npm install --registry=https://registry.npm.taobao.org

# 本地开发 启动项目
npm run dev

  • 1
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值