iissnan / iissnan/theme-next-docs

Unhandled rejection TypeError: path.substring is not a function

Open
#99 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
165
Forks
55
PR merge metrics
No merged PRs in 30d

Description

hexo g

Unhandled rejection TypeError: path.substring is not a function
at Object.urlForHelper (/Users/jack/ProjectsMy/hexo-jacks/node_modules/hexo/lib/plugins/helper/url_for.js:9:31)
at wrapper (/Users/jack/ProjectsMy/hexo-jacks/node_modules/lodash/lodash.js:4962:19)
at eval (eval at (/Users/jack/ProjectsMy/hexo-jacks/node_modules/swig/lib/swig.js:498:13), :28:119)
at Object.exports.each (/Users/jack/ProjectsMy/hexo-jacks/node_modules/swig/lib/utils.js:45:11)
at eval (eval at (/Users/jack/ProjectsMy/hexo-jacks/node_modules/swig/lib/swig.js:498:13), :21:10)
at Object.eval [as tpl] (eval at (/Users/jack/ProjectsMy/hexo-jacks/node_modules/swig/lib/swig.js:498:13), :38:3)
at compiled (/Users/jack/ProjectsMy/hexo-jacks/node_modules/swig/lib/swig.js:619:18)
at Object.eval [as tpl] (eval at (/Users/jack/ProjectsMy/hexo-jacks/node_modules/swig/lib/swig.js:498:13), :334:138)
at compiled (/Users/jack/ProjectsMy/hexo-jacks/node_modules/swig/lib/swig.js:619:18)
at _compiled (/Users/jack/ProjectsMy/hexo-jacks/node_modules/hexo/lib/theme/view.js:127:30)
at View.render (/Users/jack/ProjectsMy/hexo-jacks/node_modules/hexo/lib/theme/view.js:29:15)
at /Users/jack/ProjectsMy/hexo-jacks/node_modules/hexo/lib/hexo/index.js:387:25
at tryCatcher (/Users/jack/ProjectsMy/hexo-jacks/node_modules/hexo/node_modules/bluebird/js/release/util.js:16:23)
at /Users/jack/ProjectsMy/hexo-jacks/node_modules/hexo/node_modules/bluebird/js/release/method.js:15:34
at RouteStream._read (/Users/jack/ProjectsMy/hexo-jacks/node_modules/hexo/lib/hexo/router.js:134:3)
at RouteStream.Readable.read (_stream_readable.js:336:10)
at resume_ (_stream_readable.js:726:12)
at _combinedTickCallback (node.js:377:13)
at process._tickCallback (node.js:401:11)

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the failure with `hexo g`, then inspect `node_modules/hexo/lib/plugins/helper/url_for.js` at line 9 and the theme rendering calls shown in the stack trace. Trace which value reaches `urlForHelper`; done means generation completes without the `path.substring` TypeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.