Eurkon / hexo-theme-butterfly-eurkon

hexo-theme-butterfly魔改
https://blog.eurkon.com/
Apache License 2.0
56 stars 13 forks source link

[Bug]: Vercel部署大量报错 #2

Closed sysfox closed 1 year ago

sysfox commented 2 years ago

使用的 Butterfly 版本? | What version of Butterfly are you use?

4.3.1

使用的瀏覽器? || What browse are you using?

Safari

使用的系統? || What operating system are you using?

macOS

問題描述 | Describe the bug

以下是错误代码: bug.txt

出現問題網站 | Website

https://

Eurkon commented 2 years ago

这个是主题代码,基于butterfly魔改的

sysfox commented 2 years ago

这个是主题代码,基于butterfly魔改的

对啊,我拷贝进了themes文件夹,但我还是报了一大堆错😅

Eurkon commented 2 years ago

本地预览有问题吗,部署 Vercel 只部署编译后的 public 文件夹里面的文件,其他文件是不会在 Vercel 的 image

sysfox commented 2 years ago

本地预览有问题吗,部署 Vercel 只部署编译后的 public 文件夹里面的文件,其他文件是不会在 Vercel 的 image

这个……我是直接把源文件托管到Gitlab,然后让Vercel自己拉取生成输出的,之前的bug.txt就是它的日志

sysfox commented 2 years ago

但Vercel只保留了日志的最后两千行 (汗😅)

xlenco commented 2 years ago

@Eurkon 大佬我这个本地预览也有问题

xlenco commented 2 years ago

Unhandled rejection TypeError: F:\hexo\blog\themes\butterfly\layout\index.pug:6 4| include ./includes/mixins/post-ui.pug 5| #recent-posts.recent-posts

6| if theme.swiperNotice.enable 7| .recent-post-item(style='width:100%; height:auto; padding: 0.6rem 1rem; flex-direction:row') 8| !=partial('includes/swiper-notice', {}, {cache:theme.fragment_cache}) 9| if theme.catalogMagnet.enable

Cannot read properties of undefined (reading 'enable') at eval (eval at wrap (F:\hexo\blog\node_modules\pug-runtime\wrap.js:6:10), :1584:24) at template (eval at wrap (F:\hexo\blog\node_modules\pug-runtime\wrap.js:6:10), :5587:7) at _View._compiled (F:\hexo\blog\node_modules\hexo\lib\theme\view.js:136:50) at _View.render (F:\hexo\blog\node_modules\hexo\lib\theme\view.js:39:17) at F:\hexo\blog\node_modules\hexo\lib\hexo\index.js:64:21 at tryCatcher (F:\hexo\blog\node_modules\bluebird\js\release\util.js:16:23) at F:\hexo\blog\node_modules\bluebird\js\release\method.js:15:34 at RouteStream._read (F:\hexo\blog\nodemodules\hexo\lib\hexo\router.js:47:5) at RouteStream.Readable.read (node:internal/streams/readable:487:10) at resume (node:internal/streams/readable:988:12) at processTicksAndRejections (node:internal/process/task_queues:83:21)

Eurkon commented 2 years ago

image 这些是我魔改的,你的主题配置文件是没有的,删掉红框部分即可,其他同理报错,也可以删除

xlenco commented 2 years ago

@Eurkon 大佬可否给我一下你的魔改文件(比如必须依赖的js,css,如果感觉麻烦也可以将整个hexo文件夹打包给我) 实话实说bug我快改一天了,还是没有改完 https://wormhole.app/ 文件传输平台

xlenco commented 2 years ago

改完了,惊奇的发现这和原版的一模一样 本来冲着大佬博客里的样式来的

Eurkon commented 2 years ago

https://blog.eurkon.com/css/custom.css

xlenco commented 2 years ago

大佬你的js和css我都下载到本地引入了,但是生产页面还是错误

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Eurkon commented 1 year ago

npm i cheerio --save

------------------ 原始邮件 ------------------ 发件人: "Eurkon/hexo-theme-butterfly-eurkon" @.>; 发送时间: 2022年7月8日(星期五) 下午3:58 @.>; @.**@.>; 主题: Re: [Eurkon/hexo-theme-butterfly-eurkon] [Bug]: Vercel部署大量报错 (Issue #2)

@Eurkon 最近github上图片有点问题没看到 下面又是怎么回事呀!大佬!! ERROR { err: Error: Cannot find module 'cheerio' Require stack:

F:\hexo\blog\themes\butterfly\scripts\helpers\charts.js at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)

at Function.Module._load (node:internal/modules/cjs/loader:778:27) at Module.require (node:internal/modules/cjs/loader:1005:19) at req (F:\hexo\blog\node_modules\hexo\lib\hexo\index.js:292:23) at F:\hexo\blog\themes\butterfly\scripts\helpers\charts.js:1:82 at F:\hexo\blog\node_modules\hexo\lib\hexo\index.js:305:14 at tryCatcher (F:\hexo\blog\node_modules\bluebird\js\release\util.js:16:23) at Promise._settlePromiseFromHandler (F:\hexo\blog\node_modules\bluebird\js\release\promise.js:547:31) at Promise._settlePromise (F:\hexo\blog\node_modules\bluebird\js\release\promise.js:604:18) at Promise._settlePromise0 (F:\hexo\blog\node_modules\bluebird\js\release\promise.js:649:10) at Promise._settlePromises (F:\hexo\blog\node_modules\bluebird\js\release\promise.js:729:18) at _drainQueueStep (F:\hexo\blog\node_modules\bluebird\js\release\async.js:93:12) at _drainQueue (F:\hexo\blog\node_modules\bluebird\js\release\async.js:86:9) at Async._drainQueues (F:\hexo\blog\node_modules\bluebird\js\release\async.js:102:5) at Immediate.Async.drainQueues [as _onImmediate] (F:\hexo\blog\node_modules\bluebird\js\release\async.js:15:14) at processImmediate (node:internal/timers:466:21) { code: 'MODULE_NOT_FOUND', requireStack: [ 'F:\hexo\blog\themes\butterfly\scripts\helpers\charts.js' ] } } Script load failed: %s themes\butterfly\scripts\helpers\charts.js ERROR { err: Error: Cannot find module 'cheerio' Require stack:

F:\hexo\blog\themes\butterfly\scripts\helpers\census.js at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15) at Function.Module._load (node:internal/modules/cjs/loader:778:27) at Module.require (node:internal/modules/cjs/loader:1005:19) at req (F:\hexo\blog\node_modules\hexo\lib\hexo\index.js:292:23) at F:\hexo\blog\themes\butterfly\scripts\helpers\census.js:1:82 at F:\hexo\blog\node_modules\hexo\lib\hexo\index.js:305:14 at tryCatcher (F:\hexo\blog\node_modules\bluebird\js\release\util.js:16:23) at Promise._settlePromiseFromHandler (F:\hexo\blog\node_modules\bluebird\js\release\promise.js:547:31) at Promise._settlePromise (F:\hexo\blog\node_modules\bluebird\js\release\promise.js:604:18) at Promise._settlePromise0 (F:\hexo\blog\node_modules\bluebird\js\release\promise.js:649:10) at Promise._settlePromises (F:\hexo\blog\node_modules\bluebird\js\release\promise.js:729:18) at _drainQueueStep (F:\hexo\blog\node_modules\bluebird\js\release\async.js:93:12) at _drainQueue (F:\hexo\blog\node_modules\bluebird\js\release\async.js:86:9) at Async._drainQueues (F:\hexo\blog\node_modules\bluebird\js\release\async.js:102:5) at Immediate.Async.drainQueues [as _onImmediate] (F:\hexo\blog\node_modules\bluebird\js\release\async.js:15:14) at processImmediate (node:internal/timers:466:21) { code: 'MODULE_NOT_FOUND', requireStack: [ 'F:\hexo\blog\themes\butterfly\scripts\helpers\census.js' ] } } Script load failed: %s themes\butterfly\scripts\helpers\census.js

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>