iissnan / iissnan/theme-next-docs
Unhandled rejection TypeError: path.substring is not a functio
- Dominant language
- HTML
- Stars
- 165
- Forks
- 55
- PR merge metrics
- No merged PRs in 30d
Description
请问出现这里报错怎么办?我是在添加文件又删除后导致的,改如何解决呢?
Unhandled rejection TypeError: path.substring is not a function
at Object.urlForHelper (/Users/wunan/Documents/Study/MyBlog/hexo/node_modules/hexo/lib/plugins/helper/url_for.js:7:31)
at wrapper (/Users/wunan/Documents/Study/MyBlog/hexo/node_modules/lodash/lodash.js:4935:19)
at Object.eval [as tpl] (eval at precompile (/Users/wunan/Documents/Study/MyBlog/hexo/node_modules/swig-templates/lib/swig.js:537:13), :15:119)
at compiled (/Users/wunan/Documents/Study/MyBlog/hexo/node_modules/swig-templates/lib/swig.js:664:18)
at Object.eval [as tpl] (eval at precompile (/Users/wunan/Documents/Study/MyBlog/hexo/node_modules/swig-templates/lib/swig.js:537:13), :985:155)
at compiled (/Users/wunan/Documents/Study/MyBlog/hexo/node_modules/swig-templates/lib/swig.js:664:18)
at Theme._View.View._compiled.locals [as _compiled] (/Users/wunan/Documents/Study/MyBlog/hexo/node_modules/hexo/lib/theme/view.js:124:48)
at Theme._View.View.View.render (/Users/wunan/Documents/Study/MyBlog/hexo/node_modules/hexo/lib/theme/view.js:29:15)
at route.set (/Users/wunan/Documents/Study/MyBlog/hexo/node_modules/hexo/lib/hexo/index.js:386:29)
at tryCatcher (/Users/wunan/Documents/Study/MyBlog/hexo/node_modules/bluebird/js/release/util.js:16:23)
at /Users/wunan/Documents/Study/MyBlog/hexo/node_modules/bluebird/js/release/method.js:15:34
at RouteStream._read (/Users/wunan/Documents/Study/MyBlog/hexo/node_modules/hexo/lib/hexo/router.js:134:3)
at RouteStream.Readable.read (_stream_readable.js:442:10)
at resume_ (_stream_readable.js:822:12)
at _combinedTickCallback (internal/process/next_tick.js:139:11)
at process._tickCallback (internal/process/next_tick.js:181:9)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with node_modules/hexo/lib/plugins/helper/url_for.js at line 7 and trace the Swig-rendered theme view that calls urlForHelper. Reproduce the error after adding and deleting a file, then identify the relevant template input and confirm that rendering completes without the TypeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100