【小白教程】vue-element-admin 环境搭建

window基础环境

1,Git: Git-2.27.0-64-bit
2,JDK: jdk-8u231-windows-x64
3,Node.js :node-v12.8.0-x64
4,python:python-2.7.2.amd64
5,vscode 百度自行安装
6,VSCode配置Git 请参照热心网友 https://blog.csdn.net/weixin_40965293/article/details/80319982




vue

敲黑板!!!上面的东西我都给大家打包好了
百度云网盘:https://pan.baidu.com/s/1rU2FPmyL7ru5-HQk4NsFag 提取码:9ddz
node

7,Git配置完后,在VSCode中执行如下操做python

  • 克隆项目: git clone https://github.com/PanJiaChen/vue-element-admin.git
  • 进入项目目录:cd vue-element-admin
  • 安装依赖:npm install --registry=https://registry.npm.taobao.org
  • 启动项目:npm run dev
  • 成功照:
  • 浏览器内输入:http://localhost:9527/在这里插入图片描述

参照官网:https://panjiachen.github.io/vue-element-admin-site/zh/guide/#%E5%AE%89%E8%A3%85git

注意事项

本身在安装过程当中遇到了各类问题,就把最很差解决的问题记录下来,给你们参考,但愿能帮到大家。
(容易解决的问题百度均可以找的到的)
github

第一次安装完成,最后运行【npm run dev】报错了vue-cli

vue-element-admin@4.4.0 dev /mnt/d/h5/vue-element-adminnpm

vue-cli-service servewindows

INFO Starting development server…
98% after emitting CopyPlugin
浏览器

DONE Compiled successfully in 18824ms 3:47:42 PMide

App running at:

Local: http://localhost:9527/
Network: unavailable
Note that the development build is not optimized.
To create a production build, run npm run build.


events.js:287
throw er; // Unhandled ‘error’ event
^

Error: spawn cmd.exe ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
at onErrorNT (internal/child_process.js:469:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
Emitted ‘error’ event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:273:12)
at onErrorNT (internal/child_process.js:469:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
errno: ‘ENOENT’,
code: ‘ENOENT’,
syscall: ‘spawn cmd.exe’,
path: ‘cmd.exe’,
spawnargs: [ ‘/c’, ‘start’, ‘""’, ‘/b’, ‘http://localhost:9527/’ ]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! vue-element-admin@4.4.0 dev: vue-cli-service serve
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the vue-element-admin@4.4.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.



















npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-06-24T07_47_42_933Z-debug.log`

参考大佬提供的解决方案:

  • 系统环境变量的path中添加C:\windows\system32
  • vue.config.js 中 open:true 注释掉或者 改为false,运行完程序后,不自动启动浏览器。

原文地址:
https://github.com/vuejs/vue-cli/issues/4125
https://github.com/PanJiaChen/vue-element-admin/issues/2311

最后,不怕小白就怕不努力的小白

相关文章
相关标签/搜索