amehime / hexo-theme-shoka

Just For https://shoka.lostyu.me/
MIT License
896 stars 206 forks source link

首次使用shoka主题,多个报错 #26

Closed kuole-o closed 2 weeks ago

kuole-o commented 3 years ago

老板,报告几个问题:

问题1

PS E:\shoka> hexo server
INFO  Validating config
ERROR {
  err: Error: Cannot find module 'pangu'
  Require stack:
  - E:\work\Git\shoka\themes\shoka\scripts\renderer\njk.js
      at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
      at Function.Module._load (internal/modules/cjs/loader.js:725:27)
      at Module.require (internal/modules/cjs/loader.js:952:19)
      at req (E:\work\Git\shoka\node_modules\hexo\lib\hexo\index.js:292:23)
      at E:\work\Git\shoka\themes\shoka\scripts\renderer\njk.js:6:15
      at E:\work\Git\shoka\node_modules\hexo\lib\hexo\index.js:305:14
      at tryCatcher (E:\work\Git\shoka\node_modules\bluebird\js\release\util.js:16:23)
      at Promise._settlePromiseFromHandler (E:\work\Git\shoka\node_modules\bluebird\js\release\promise.js:547:31)
      at Promise._settlePromise (E:\work\Git\shoka\node_modules\bluebird\js\release\promise.js:604:18)
      at Promise._settlePromise0 (E:\work\Git\shoka\node_modules\bluebird\js\release\promise.js:649:10)
      at Promise._settlePromises (E:\work\Git\shoka\node_modules\bluebird\js\release\promise.js:729:18)
      at _drainQueueStep (E:\work\Git\shoka\node_modules\bluebird\js\release\async.js:93:12)
      at _drainQueue (E:\work\Git\shoka\node_modules\bluebird\js\release\async.js:86:9)
      at Async._drainQueues (E:\work\Git\shoka\node_modules\bluebird\js\release\async.js:102:5)
      at Immediate.Async.drainQueues [as _onImmediate] (E:\work\Git\shoka\node_modules\bluebird\js\release\async.js:15:14)
      at processImmediate (internal/timers.js:461:21) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
      'E:\\work\\Git\\shoka\\themes\\shoka\\scripts\\renderer\\njk.js'
    ]
  }
} Script load failed: %s themes\shoka\scripts\renderer\njk.js
INFO  Start processing
(node:25060) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:25060) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:25060) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
(node:25060) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(node:25060) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:25060) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
FATAL {
  err: Error: Function yaml.safeLoad is removed in js-yaml 4. Use yaml.load instead, which is now safe by default.
      at Object.safeLoad (E:\work\Git\shoka\node_modules\js-yaml\index.js:10:11)
      at Hexo.<anonymous> (E:\work\Git\shoka\themes\shoka\scripts\generaters\config.js:41:41)
      at Hexo.tryCatcher (E:\work\Git\shoka\node_modules\bluebird\js\release\util.js:16:23)
      at Hexo.<anonymous> (E:\work\Git\shoka\node_modules\bluebird\js\release\method.js:15:34)
      at E:\work\Git\shoka\node_modules\hexo\lib\extend\filter.js:67:52
      at tryCatcher (E:\work\Git\shoka\node_modules\bluebird\js\release\util.js:16:23)
      at Object.gotValue (E:\work\Git\shoka\node_modules\bluebird\js\release\reduce.js:166:18)
      at Object.gotAccum (E:\work\Git\shoka\node_modules\bluebird\js\release\reduce.js:155:25)
      at Object.tryCatcher (E:\work\Git\shoka\node_modules\bluebird\js\release\util.js:16:23)
      at Promise._settlePromiseFromHandler (E:\work\Git\shoka\node_modules\bluebird\js\release\promise.js:547:31)
      at Promise._settlePromise (E:\work\Git\shoka\node_modules\bluebird\js\release\promise.js:604:18)
      at Promise._settlePromises (E:\work\Git\shoka\node_modules\bluebird\js\release\promise.js:729:18)
      at Promise._fulfill (E:\work\Git\shoka\node_modules\bluebird\js\release\promise.js:673:18)
      at Promise._resolveCallback (E:\work\Git\shoka\node_modules\bluebird\js\release\promise.js:466:57)
      at Promise._settlePromiseFromHandler (E:\work\Git\shoka\node_modules\bluebird\js\release\promise.js:559:17)
      at Promise._settlePromise (E:\work\Git\shoka\node_modules\bluebird\js\release\promise.js:604:18)
      at Promise._settlePromise0 (E:\work\Git\shoka\node_modules\bluebird\js\release\promise.js:649:10)
      at Promise._settlePromises (E:\work\Git\shoka\node_modules\bluebird\js\release\promise.js:729:18)
      at Promise._fulfill (E:\work\Git\shoka\node_modules\bluebird\js\release\promise.js:673:18)
      at PromiseArray._resolve (E:\work\Git\shoka\node_modules\bluebird\js\release\promise_array.js:127:19)
      at PromiseArray._promiseFulfilled (E:\work\Git\shoka\node_modules\bluebird\js\release\promise_array.js:145:14)
} Something's wrong. Maybe you can find the solution here: %s https://hexo.io/docs/troubleshooting.html

解决方法:npm install remark-pangu

问题2

PS E:\shoka> hexo server
INFO  Validating config
INFO  Start processing
FATAL {
  err: Error: Function yaml.safeLoad is removed in js-yaml 4. Use yaml.load instead, which is now safe by default.
      at Object.safeLoad (E:\work\Git\shoka\node_modules\js-yaml\index.js:10:11)
      at Hexo.<anonymous> (E:\work\Git\shoka\themes\shoka\scripts\generaters\config.js:41:41)
      at Hexo.tryCatcher (E:\work\Git\shoka\node_modules\bluebird\js\release\util.js:16:23)
      at Hexo.<anonymous> (E:\work\Git\shoka\node_modules\bluebird\js\release\method.js:15:34)
      at E:\work\Git\shoka\node_modules\hexo\lib\extend\filter.js:67:52
      at tryCatcher (E:\work\Git\shoka\node_modules\bluebird\js\release\util.js:16:23)
      at Object.gotValue (E:\work\Git\shoka\node_modules\bluebird\js\release\reduce.js:166:18)
      at Object.gotAccum (E:\work\Git\shoka\node_modules\bluebird\js\release\reduce.js:155:25)
      at Object.tryCatcher (E:\work\Git\shoka\node_modules\bluebird\js\release\util.js:16:23)
      at Promise._settlePromiseFromHandler (E:\work\Git\shoka\node_modules\bluebird\js\release\promise.js:547:31)
      at Promise._settlePromise (E:\work\Git\shoka\node_modules\bluebird\js\release\promise.js:604:18)
      at Promise._settlePromises (E:\work\Git\shoka\node_modules\bluebird\js\release\promise.js:729:18)
      at Promise._fulfill (E:\work\Git\shoka\node_modules\bluebird\js\release\promise.js:673:18)
      at Promise._resolveCallback (E:\work\Git\shoka\node_modules\bluebird\js\release\promise.js:466:57)
      at Promise._settlePromiseFromHandler (E:\work\Git\shoka\node_modules\bluebird\js\release\promise.js:559:17)
      at Promise._settlePromise (E:\work\Git\shoka\node_modules\bluebird\js\release\promise.js:604:18)
      at Promise._settlePromise0 (E:\work\Git\shoka\node_modules\bluebird\js\release\promise.js:649:10)
      at Promise._settlePromises (E:\work\Git\shoka\node_modules\bluebird\js\release\promise.js:729:18)
      at Promise._fulfill (E:\work\Git\shoka\node_modules\bluebird\js\release\promise.js:673:18)
      at PromiseArray._resolve (E:\work\Git\shoka\node_modules\bluebird\js\release\promise_array.js:127:19)
      at PromiseArray._promiseFulfilled (E:\work\Git\shoka\node_modules\bluebird\js\release\promise_array.js:145:14)
} Something's wrong. Maybe you can find the solution here: %s https://hexo.io/docs/troubleshooting.html

解决方法: 参考这里:https://blog.csdn.net/weixin_45149481/article/details/116609116
找到shoka\scripts\generaters\config.js,41行 yaml.safeLoad改为yaml.load

问题3

全局bgm,增加了QQ音乐的URL,实际空白刷不出来:https://c.y.qq.com/base/fcgi-bin/u?__=PZfDUm4f

问题4

1.按主题给的config改,只配置1个 “首页”菜单,预览时,导航栏有两个“首页”,右侧个人信息处,也有两个。 2.只配置了有限几个社交链接,其他注释掉了,实际预览时,还是会展示出注释掉的内容:
image image image

以上,大佬看看啊 辛苦了!主题太漂亮了 那个音乐控件,馋哭了,能单独出个hexo插件,肯定要爆。评论系统,也希望能接入下 twikoo

Nirvana1997 commented 3 years ago

问题4的2我也遇到了,原因是主题自身的配置-shoka/_config.ym里默认添加了一些社交链接,注释掉就好了~ image image

kuole-o commented 3 years ago

问题4的2我也遇到了,原因是主题自身的配置-shoka/_config.ym里默认添加了一些社交链接,注释掉就好了~ image image

感谢 我试试看

Liuhang0624 commented 2 years ago

npm install remark-pangu 为啥我安装完盘古还是报错啊

smallmaster1 commented 1 year ago

@kuole-o ,这个首页的东西,都消失了怎么整。 image

vaeXu commented 4 weeks ago

npm install remark-pangu 为啥我安装完盘古还是报错啊

把remark-去掉