最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【已解决】Mac中本地初始化和运行vuejs的模板项目vue-admin-template

Vue crifan 1357浏览 0评论
折腾:
【未解决】用vuejs搭建智能电力管理系统的前端页面
期间,去下载代码
PanJiaChen/vue-admin-template: a vue2.0 minimal admin template
git clone https://github.com/PanJiaChen/vue-admin-template.git
然后看看如何处理
PanJiaChen/vue-element-admin: A magical vue admin
vue-element-admin/README.zh-CN.md at master · PanJiaChen/vue-element-admin
vue-element-admin
PanJiaChen/vue-admin-template: a vue2.0 minimal admin template
npm install
详细日志
➜  vue-admin-template git:(master) npm install
npm WARN deprecated [email protected]: This project has been renamed to 'tasksfile'. Install using 'npm install tasksfile' instead.
npm WARN deprecated [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm WARN deprecated [email protected]: This project has been renamed to @pawelgalazka/cli . Install using @pawelgalazka/cli instead
npm WARN deprecated [email protected]: This project has been renamed to @pawelgalazka/cli-args. Install using @pawelgalazka/cli-args instead
npm WARN deprecated [email protected]: CircularJSON is in maintenance only, flatted is its successor.
npm WARN deprecated [email protected]: Please upgrade to kleur@3 or migrate to 'ansi-colors' if you prefer the old syntax. Visit <https://github.com/lukeed/kleur/releases/tag/v3.0.0\> for migration path(s).
npm WARN deprecated [email protected]: use String.prototype.padStart()

> [email protected] install /Users/crifan/dev/dev_root/projects/xxx/src/client/vue-admin-template/node_modules/fsevents
> node-gyp rebuild

gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
make: Entering directory '/Users/crifan/dev/dev_root/projects/xxx/src/client/vue-admin-template/node_modules/fsevents/build'
  SOLINK_MODULE(target) Release/.node
  CXX(target) Release/obj.target/fse/fsevents.o
  SOLINK_MODULE(target) Release/fse.node
make: Leaving directory '/Users/crifan/dev/dev_root/projects/xxx/src/client/vue-admin-template/node_modules/fsevents/build'

> [email protected] install /Users/crifan/dev/dev_root/projects/xxx/src/client/vue-admin-template/node_modules/yorkie
> node bin/install.js

setting up Git hooks
done

> [email protected] install /Users/crifan/dev/dev_root/projects/xxx/src/client/vue-admin-template/node_modules/node-sass
> node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.13.1/darwin-x64-64_binding.node
Download complete  ⸩ ⠋ :
Binary saved to /Users/crifan/dev/dev_root/projects/xxx/src/client/vue-admin-template/node_modules/node-sass/vendor/darwin-x64-64/binding.node
Caching binary to /Users/crifan/.npm/node-sass/4.13.1/darwin-x64-64_binding.node

> [email protected] postinstall /Users/crifan/dev/dev_root/projects/xxx/src/client/vue-admin-template/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: 
> https://opencollective.com/core-js 
> https://www.patreon.com/zloirock 

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)

> [email protected] postinstall /Users/crifan/dev/dev_root/projects/xxx/src/client/vue-admin-template/node_modules/ejs
> node ./postinstall.js

Thank you for installing EJS: built with the Jake JavaScript build tool (https://jakejs.com/)

> [email protected] postinstall /Users/crifan/dev/dev_root/projects/xxx/src/client/vue-admin-template/node_modules/node-sass
> node scripts/build.js

Binary found at /Users/crifan/dev/dev_root/projects/xxx/src/client/vue-admin-template/node_modules/node-sass/vendor/darwin-x64-64/binding.node
Testing binary
Binary is fine
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN [email protected] No repository field.

added 1776 packages from 802 contributors in 445.656s
然后再去:
npm run dev
详细日志
➜  vue-admin-template git:(master) npm run dev


> [email protected] dev /Users/crifan/dev/dev_root/projects/xxx/src/client/vue-admin-template
> vue-cli-service serve


 INFO  Starting development server...
 10% building 2/2 modules 0 activeℹ 「wds」: Project is running at http://localhost:9528/
ℹ 「wds」: webpack output is served from /
ℹ 「wds」: Content not from webpack is served from /Users/crifan/dev/dev_root/projects/xxx/src/client/vue-admin-template/public
ℹ 「wds」: 404s will fallback to /index.html
 98% after emitting CopyPlugin                                                      


 DONE  Compiled successfully in 22627ms                                                                      20:58:02


 
  App running at:
  - Local:   http://localhost:9528/ 
  - Network: http://192.168.31.12:9528/

  Note that the development build is not optimized.
  To create a production build, run npm run build.
结果:
“Visual Studio Code.app”想要控制“Google Chrome.app”。允许控制将提供对“Google Chrome.app”中文稿和数据的访问权限,以及允许在该App中执行操作
Vue Admin Template
http://localhost:9528/#/login?redirect=%2Fdashboard
看来可以了。
进入后:
后来可以看到终端中显示对应的访问日志:
request invoke:/dev-api/vue-admin-template/user/login
request invoke:/dev-api/vue-admin-template/user/info
request invoke:/dev-api/vue-admin-template/table/list
request invoke:/dev-api/vue-admin-template/table/list
不过先去运行服务端:
【已解决】maven运行spring boot报错:ERROR HikariPool.java HikariPool-1 Exception during pool initialization Communications link failure
【总结】
此处搭建起来,很简单:
git clone https://github.com/PanJiaChen/vue-admin-template.git

npm install

npm run dev
即可本地调试运行
首页地址是
  • 本机访问:http://localhost:9528/
  •  本地局域网别的电脑访问:http://192.168.31.12:9528/
    • 其中192.168.31.12是自己当前的IP
然后继续:
【未解决】Mac中用vue-admin-template实现智能电力前端页面功能模块

转载请注明:在路上 » 【已解决】Mac中本地初始化和运行vuejs的模板项目vue-admin-template

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
90 queries in 0.184 seconds, using 22.14MB memory