jaredly / jaredly/hexium

Theme doesn't work with hexo 2.8.3

Open
#3 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
CSS
Stars
25
Forks
7
PR merge metrics
No merged PRs in 30d

Description

When I `git clone git@github.com:jaredly/hexium.git themes/hexium` then change `theme` to `hexium` in `_config.yml` and then `hexo server` when I go to the browser I get:

```
{{! Document Settings }} {{! Page Meta }} {{! Styles'n'Scripts }} {{! Ghost outputs important style and meta data with this tag }} {{ghost_head}} {{! Everything else gets inserted here }} {{{body}}} {{! Ghost outputs important scripts and data with this tag }} {{ghost_foot}} {{! The main JavaScript file for Casper }} {{#if theme.ga_id}} {{/if}}
```

If I then do `npm install hexo-renderer-handlebars --save` I get :

```
Error: Cannot find module 'moment'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object. (/Users/johndoe/test-hexo/themes/hexium/helper/index.js:3:14)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
```

If I then `npm i moment --save` then I get:

```
TypeError: Cannot read property 'slice' of undefined
at Object.module.exports.asset (/Users/johndoe/test-hexo/themes/hexium/helper/index.js:19:13)
at Object.eval (eval at (/Users/johndoe/test-hexo/node_modules/hexo-renderer-handlebars/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js:189:23), :43:222)
at /Users/johndoe/test-hexo/node_modules/hexo-renderer-handlebars/node_modules/handlebars/dist/cjs/handlebars/runtime.js:86:31
at /Users/johndoe/test-hexo/node_modules/hexo-renderer-handlebars/node_modules/handlebars/dist/cjs/handlebars/compiler/compiler.js:465:21
at handlebarsRenderer (/Users/johndoe/test-hexo/node_modules/hexo-renderer-handlebars/index.js:32:10)
at Domain. (/usr/local/lib/node_modules/hexo/lib/extend/renderer.js:78:38)
at Domain.run (domain.js:197:16)
at store.(anonymous function) (/usr/local/lib/node_modules/hexo/lib/extend/renderer.js:77:9)
at /usr/local/lib/node_modules/hexo/lib/core/render.js:96:9
at fn (/usr/local/lib/node_modules/hexo/node_modules/async/lib/async.js:641:34)
```

Help :)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the reported setup with Hexo 2.8.3 and hexo-renderer-handlebars, then inspect themes/hexium/helper/index.js, especially the failing asset helper, alongside _config.yml. Trace the missing moment dependency and the undefined value in the stack traces; done means the hexium theme renders without these module or runtime errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
handlebars, javascript, node.js
Domain
frontend, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.