yscoder / hexo-theme-indigo

一个Material Design风格的Hexo主题。 https://imys.net/    备用:
https://yscoder.github.io/
The Unlicense
2.79k stars 543 forks source link

ERROR Render HTML failed: index.html TypeError: D:\www\hexo\hexo\themes\indigo-plus\layout\layout.ejs:3 #487

Open Yeksha opened 4 years ago

Yeksha commented 4 years ago

你好,我在Windows10 pro 18362.329版本测试会出错。安装和使用hexo官方版本没问题,切换indigo主题,执行hexo g会报错。或者hexo clean之后hexo s打开请求之后出错。不知道是不是Windows10系统环境的问题。我在CentOS7和Ubuntu16.04LTS都没问题。

ERROR Render HTML failed: index.html TypeError: D:\www\hexo\hexo\themes\indigo-plus\layout\layout.ejs:3 1| <!DOCTYPE html> 2|

3| <%- partial('_partial/head') %> 4| 5| <%- partial('_partial/loading') %> 6| <%- partial('_partial/menu') %>

D:\www\hexo\hexo\themes\indigo-plus\layout_partial\head.ejs:51 49| <%- open_graph({twitter_id: theme.twitter, google_plus: theme.google_plus, fb_admins: theme.fb_admins, fb_app_id: theme.fb_app_id}) %> 50| <% if ((config.feed) && (config.feed.path.length)) { %>

51| 52| <% } %> 53| <%- favicon_tag(theme.favicon) %> 54|

path.startsWith is not a function at Object.urlForHelper (D:\www\hexo\hexo\node_modules\hexo-util\lib\url_for.js:16:31) at Object.module.exports (D:\www\hexo\hexo\node_modules\hexo\lib\plugins\helper\url_for.js:6:18) at eval (eval at compile (D:\www\hexo\hexo\node_modules\ejs\lib\ejs.js:633:12), :112:17) at returnedFn (D:\www\hexo\hexo\node_modules\ejs\lib\ejs.js:668:17) at Theme._View.View._compiledSync (D:\www\hexo\hexo\node_modules\hexo\lib\theme\view.js:119:22) at Theme._View.View.View.renderSync (D:\www\hexo\hexo\node_modules\hexo\lib\theme\view.js:48:23) at Object.partial (D:\www\hexo\hexo\node_modules\hexo\lib\plugins\helper\partial.js:34:15) at eval (eval at compile (D:\www\hexo\hexo\node_modules\ejs\lib\ejs.js:633:12), :11:17) at returnedFn (D:\www\hexo\hexo\node_modules\ejs\lib\ejs.js:668:17) at Theme._View.View._compiled (D:\www\hexo\hexo\node_modules\hexo\lib\theme\view.js:123:48) at Theme._View.View.View.render (D:\www\hexo\hexo\node_modules\hexo\lib\theme\view.js:29:15) at D:\www\hexo\hexo\node_modules\hexo\lib\theme\view.js:40:23 at tryCatcher (D:\www\hexo\hexo\node_modules\bluebird\js\release\util.js:16:23) at Promise._settlePromiseFromHandler (D:\www\hexo\hexo\node_modules\bluebird\js\release\promise.js:547:31) at Promise._settlePromise (D:\www\hexo\hexo\node_modules\bluebird\js\release\promise.js:604:18) at Promise._settlePromise0 (D:\www\hexo\hexo\node_modules\bluebird\js\release\promise.js:649:10) at Promise._settlePromises (D:\www\hexo\hexo\node_modules\bluebird\js\release\promise.js:729:18) at _drainQueueStep (D:\www\hexo\hexo\node_modules\bluebird\js\release\async.js:93:12) at _drainQueue (D:\www\hexo\hexo\node_modules\bluebird\js\release\async.js:86:9) at Async._drainQueues (D:\www\hexo\hexo\node_modules\bluebird\js\release\async.js:102:5) at Immediate.Async.drainQueues [as _onImmediate] (D:\www\hexo\hexo\node_modules\bluebird\js\release\async.js:15:14) at processImmediate (internal/timers.js:439:21) Unhandled rejection TypeError: D:\www\hexo\hexo\themes\indigo-plus\layout\layout.ejs:3 1| <!DOCTYPE html> 2|

3| <%- partial('_partial/head') %> 4| 5| <%- partial('_partial/loading') %> 6| <%- partial('_partial/menu') %>

D:\www\hexo\hexo\themes\indigo-plus\layout_partial\head.ejs:51 49| <%- open_graph({twitter_id: theme.twitter, google_plus: theme.google_plus, fb_admins: theme.fb_admins, fb_app_id: theme.fb_app_id}) %> 50| <% if ((config.feed) && (config.feed.path.length)) { %>

51| 52| <% } %> 53| <%- favicon_tag(theme.favicon) %> 54|

path.startsWith is not a function at Object.urlForHelper (D:\www\hexo\hexo\node_modules\hexo-util\lib\url_for.js:16:31) at Object.module.exports (D:\www\hexo\hexo\node_modules\hexo\lib\plugins\helper\url_for.js:6:18) at eval (eval at compile (D:\www\hexo\hexo\node_modules\ejs\lib\ejs.js:633:12), :112:17) at returnedFn (D:\www\hexo\hexo\node_modules\ejs\lib\ejs.js:668:17) at Theme._View.View._compiledSync (D:\www\hexo\hexo\node_modules\hexo\lib\theme\view.js:119:22) at Theme._View.View.View.renderSync (D:\www\hexo\hexo\node_modules\hexo\lib\theme\view.js:48:23) at Object.partial (D:\www\hexo\hexo\node_modules\hexo\lib\plugins\helper\partial.js:34:15) at eval (eval at compile (D:\www\hexo\hexo\node_modules\ejs\lib\ejs.js:633:12), :11:17) at returnedFn (D:\www\hexo\hexo\node_modules\ejs\lib\ejs.js:668:17) at Theme._View.View._compiled (D:\www\hexo\hexo\node_modules\hexo\lib\theme\view.js:123:48) at Theme._View.View.View.render (D:\www\hexo\hexo\node_modules\hexo\lib\theme\view.js:29:15) at D:\www\hexo\hexo\node_modules\hexo\lib\theme\view.js:40:23 at tryCatcher (D:\www\hexo\hexo\node_modules\bluebird\js\release\util.js:16:23) at Promise._settlePromiseFromHandler (D:\www\hexo\hexo\node_modules\bluebird\js\release\promise.js:547:31) at Promise._settlePromise (D:\www\hexo\hexo\node_modules\bluebird\js\release\promise.js:604:18) at Promise._settlePromise0 (D:\www\hexo\hexo\node_modules\bluebird\js\release\promise.js:649:10) at Promise._settlePromises (D:\www\hexo\hexo\node_modules\bluebird\js\release\promise.js:729:18) at _drainQueueStep (D:\www\hexo\hexo\node_modules\bluebird\js\release\async.js:93:12) at _drainQueue (D:\www\hexo\hexo\node_modules\bluebird\js\release\async.js:86:9) at Async._drainQueues (D:\www\hexo\hexo\node_modules\bluebird\js\release\async.js:102:5) at Immediate.Async.drainQueues [as _onImmediate] (D:\www\hexo\hexo\node_modules\bluebird\js\release\async.js:15:14) at processImmediate (internal/timers.js:439:21)

ByeJD commented 4 years ago

同样

hyzs1220 commented 4 years ago

我的也是,有解决措施吗?

McLeeX commented 4 years ago

同样的问题。我是linux系统,执行hexo generate也是这个错误

Yeksha commented 4 years ago

我没有解决,我的服务器倒是没问题。 我换了另一个主题了。

tjut-arts commented 4 years ago

同问,windows使用这个主题遇到同样问题,默认主题不会出现

tjut-arts commented 4 years ago

你好,我在Windows10 pro 18362.329版本测试会出错。安装和使用hexo官方版本没问题,切换indigo主题,执行hexo g会报错。或者hexo clean之后hexo s打开请求之后出错。不知道是不是Windows10系统环境的问题。我在CentOS7和Ubuntu16.04LTS都没问题。

ERROR Render HTML failed: index.html TypeError: D:\www\hexo\hexo\themes\indigo-plus\layout\layout.ejs:3 1| 2|

3| <%- partial('_partial/head') %> 4| 5| <%- partial('_partial/loading') %> 6| <%- partial('_partial/menu') %>

D:\www\hexo\hexo\themes\indigo-plus\layout_partial\head.ejs:51 49| <%- open_graph({twitter_id: theme.twitter, google_plus: theme.google_plus, fb_admins: theme.fb_admins, fb_app_id: theme.fb_app_id}) %> 50| <% if ((config.feed) && (config.feed.path.length)) { %>

51|
52| <% } %> 53| <%- favicon_tag(theme.favicon) %> 54|

path.startsWith is not a function at Object.urlForHelper (D:\www\hexo\hexo\node_modules\hexo-util\lib\url_for.js:16:31) at Object.module.exports (D:\www\hexo\hexo\node_modules\hexo\lib\plugins\helper\url_for.js:6:18) at eval (eval at compile (D:\www\hexo\hexo\node_modules\ejs\lib\ejs.js:633:12), :112:17) at returnedFn (D:\www\hexo\hexo\node_modules\ejs\lib\ejs.js:668:17) at Theme._View.View._compiledSync (D:\www\hexo\hexo\node_modules\hexo\lib\theme\view.js:119:22) at Theme._View.View.View.renderSync (D:\www\hexo\hexo\node_modules\hexo\lib\theme\view.js:48:23) at Object.partial (D:\www\hexo\hexo\node_modules\hexo\lib\plugins\helper\partial.js:34:15) at eval (eval at compile (D:\www\hexo\hexo\node_modules\ejs\lib\ejs.js:633:12), :11:17) at returnedFn (D:\www\hexo\hexo\node_modules\ejs\lib\ejs.js:668:17) at Theme._View.View._compiled (D:\www\hexo\hexo\node_modules\hexo\lib\theme\view.js:123:48) at Theme._View.View.View.render (D:\www\hexo\hexo\node_modules\hexo\lib\theme\view.js:29:15) at D:\www\hexo\hexo\node_modules\hexo\lib\theme\view.js:40:23 at tryCatcher (D:\www\hexo\hexo\node_modules\bluebird\js\release\util.js:16:23) at Promise._settlePromiseFromHandler (D:\www\hexo\hexo\node_modules\bluebird\js\release\promise.js:547:31) at Promise._settlePromise (D:\www\hexo\hexo\node_modules\bluebird\js\release\promise.js:604:18) at Promise._settlePromise0 (D:\www\hexo\hexo\node_modules\bluebird\js\release\promise.js:649:10) at Promise._settlePromises (D:\www\hexo\hexo\node_modules\bluebird\js\release\promise.js:729:18) at _drainQueueStep (D:\www\hexo\hexo\node_modules\bluebird\js\release\async.js:93:12) at _drainQueue (D:\www\hexo\hexo\node_modules\bluebird\js\release\async.js:86:9) at Async._drainQueues (D:\www\hexo\hexo\node_modules\bluebird\js\release\async.js:102:5) at Immediate.Async.drainQueues [as _onImmediate] (D:\www\hexo\hexo\node_modules\bluebird\js\release\async.js:15:14) at processImmediate (internal/timers.js:439:21) Unhandled rejection TypeError: D:\www\hexo\hexo\themes\indigo-plus\layout\layout.ejs:3 1| 2|

3| <%- partial('_partial/head') %> 4| 5| <%- partial('_partial/loading') %> 6| <%- partial('_partial/menu') %>

D:\www\hexo\hexo\themes\indigo-plus\layout_partial\head.ejs:51 49| <%- open_graph({twitter_id: theme.twitter, google_plus: theme.google_plus, fb_admins: theme.fb_admins, fb_app_id: theme.fb_app_id}) %> 50| <% if ((config.feed) && (config.feed.path.length)) { %>

51|
52| <% } %> 53| <%- favicon_tag(theme.favicon) %> 54|

path.startsWith is not a function at Object.urlForHelper (D:\www\hexo\hexo\node_modules\hexo-util\lib\url_for.js:16:31) at Object.module.exports (D:\www\hexo\hexo\node_modules\hexo\lib\plugins\helper\url_for.js:6:18) at eval (eval at compile (D:\www\hexo\hexo\node_modules\ejs\lib\ejs.js:633:12), :112:17) at returnedFn (D:\www\hexo\hexo\node_modules\ejs\lib\ejs.js:668:17) at Theme._View.View._compiledSync (D:\www\hexo\hexo\node_modules\hexo\lib\theme\view.js:119:22) at Theme._View.View.View.renderSync (D:\www\hexo\hexo\node_modules\hexo\lib\theme\view.js:48:23) at Object.partial (D:\www\hexo\hexo\node_modules\hexo\lib\plugins\helper\partial.js:34:15) at eval (eval at compile (D:\www\hexo\hexo\node_modules\ejs\lib\ejs.js:633:12), :11:17) at returnedFn (D:\www\hexo\hexo\node_modules\ejs\lib\ejs.js:668:17) at Theme._View.View._compiled (D:\www\hexo\hexo\node_modules\hexo\lib\theme\view.js:123:48) at Theme._View.View.View.render (D:\www\hexo\hexo\node_modules\hexo\lib\theme\view.js:29:15) at D:\www\hexo\hexo\node_modules\hexo\lib\theme\view.js:40:23 at tryCatcher (D:\www\hexo\hexo\node_modules\bluebird\js\release\util.js:16:23) at Promise._settlePromiseFromHandler (D:\www\hexo\hexo\node_modules\bluebird\js\release\promise.js:547:31) at Promise._settlePromise (D:\www\hexo\hexo\node_modules\bluebird\js\release\promise.js:604:18) at Promise._settlePromise0 (D:\www\hexo\hexo\node_modules\bluebird\js\release\promise.js:649:10) at Promise._settlePromises (D:\www\hexo\hexo\node_modules\bluebird\js\release\promise.js:729:18) at _drainQueueStep (D:\www\hexo\hexo\node_modules\bluebird\js\release\async.js:93:12) at _drainQueue (D:\www\hexo\hexo\node_modules\bluebird\js\release\async.js:86:9) at Async._drainQueues (D:\www\hexo\hexo\node_modules\bluebird\js\release\async.js:102:5) at Immediate.Async.drainQueues [as _onImmediate] (D:\www\hexo\hexo\node_modules\bluebird\js\release\async.js:15:14) at processImmediate (internal/timers.js:439:21)

切换为master分支,解决了

tjut-arts commented 4 years ago

执行 git branch 显示所有本地分支,如果只存在一个分支,可以执行下面的命令获取另一分支的主题。

获取远程 card 分支,并切换

$ git checkout -b card origin/card

获取远程 master 分支,并切换

$ git checkout -b master origin/master

此命令只需执行一次,之后使用 git checkout [branch] 命令在两个主题之间切换。

Yeksha commented 4 years ago

你好,我在Windows10 pro 18362.329版本测试会出错。安装和使用hexo官方版本没问题,切换indigo主题,执行hexo g会报错。或者hexo clean之后hexo s打开请求之后出错。不知道是不是Windows10系统环境的问题。我在CentOS7和Ubuntu16.04LTS都没问题。 ERROR Render HTML failed: index.html TypeError: D:\www\hexo\hexo\themes\indigo-plus\layout\layout.ejs:3 1| 2|

3| <%- partial('_partial/head') %> 4| 5| <%- partial('_partial/loading') %> 6| <%- partial('_partial/menu') %>

D:\www\hexo\hexo\themes\indigo-plus\layout_partial\head.ejs:51 49| <%- open_graph({twitter_id: theme.twitter, google_plus: theme.google_plus, fb_admins: theme.fb_admins, fb_app_id: theme.fb_app_id}) %> 50| <% if ((config.feed) && (config.feed.path.length)) { %>

51| 52| <% } %> 53| <%- favicon_tag(theme.favicon) %> 54|

path.startsWith is not a function at Object.urlForHelper (D:\www\hexo\hexo\node_modules\hexo-util\lib\url_for.js:16:31) at Object.module.exports (D:\www\hexo\hexo\node_modules\hexo\lib\plugins\helper\url_for.js:6:18) at eval (eval at compile (D:\www\hexo\hexo\node_modules\ejs\lib\ejs.js:633:12), :112:17) at returnedFn (D:\www\hexo\hexo\node_modules\ejs\lib\ejs.js:668:17) at Theme._View.View._compiledSync (D:\www\hexo\hexo\node_modules\hexo\lib\theme\view.js:119:22) at Theme._View.View.View.renderSync (D:\www\hexo\hexo\node_modules\hexo\lib\theme\view.js:48:23) at Object.partial (D:\www\hexo\hexo\node_modules\hexo\lib\plugins\helper\partial.js:34:15) at eval (eval at compile (D:\www\hexo\hexo\node_modules\ejs\lib\ejs.js:633:12), :11:17) at returnedFn (D:\www\hexo\hexo\node_modules\ejs\lib\ejs.js:668:17) at Theme._View.View._compiled (D:\www\hexo\hexo\node_modules\hexo\lib\theme\view.js:123:48) at Theme._View.View.View.render (D:\www\hexo\hexo\node_modules\hexo\lib\theme\view.js:29:15) at D:\www\hexo\hexo\node_modules\hexo\lib\theme\view.js:40:23 at tryCatcher (D:\www\hexo\hexo\node_modules\bluebird\js\release\util.js:16:23) at Promise._settlePromiseFromHandler (D:\www\hexo\hexo\node_modules\bluebird\js\release\promise.js:547:31) at Promise._settlePromise (D:\www\hexo\hexo\node_modules\bluebird\js\release\promise.js:604:18) at Promise._settlePromise0 (D:\www\hexo\hexo\node_modules\bluebird\js\release\promise.js:649:10) at Promise._settlePromises (D:\www\hexo\hexo\node_modules\bluebird\js\release\promise.js:729:18) at _drainQueueStep (D:\www\hexo\hexo\node_modules\bluebird\js\release\async.js:93:12) at _drainQueue (D:\www\hexo\hexo\node_modules\bluebird\js\release\async.js:86:9) at Async._drainQueues (D:\www\hexo\hexo\node_modules\bluebird\js\release\async.js:102:5) at Immediate.Async.drainQueues [as _onImmediate] (D:\www\hexo\hexo\node_modules\bluebird\js\release\async.js:15:14) at processImmediate (internal/timers.js:439:21) Unhandled rejection TypeError: D:\www\hexo\hexo\themes\indigo-plus\layout\layout.ejs:3 1| 2|

3| <%- partial('_partial/head') %> 4| 5| <%- partial('_partial/loading') %> 6| <%- partial('_partial/menu') %>

D:\www\hexo\hexo\themes\indigo-plus\layout_partial\head.ejs:51 49| <%- open_graph({twitter_id: theme.twitter, google_plus: theme.google_plus, fb_admins: theme.fb_admins, fb_app_id: theme.fb_app_id}) %> 50| <% if ((config.feed) && (config.feed.path.length)) { %>

51| 52| <% } %> 53| <%- favicon_tag(theme.favicon) %> 54|

path.startsWith is not a function at Object.urlForHelper (D:\www\hexo\hexo\node_modules\hexo-util\lib\url_for.js:16:31) at Object.module.exports (D:\www\hexo\hexo\node_modules\hexo\lib\plugins\helper\url_for.js:6:18) at eval (eval at compile (D:\www\hexo\hexo\node_modules\ejs\lib\ejs.js:633:12), :112:17) at returnedFn (D:\www\hexo\hexo\node_modules\ejs\lib\ejs.js:668:17) at Theme._View.View._compiledSync (D:\www\hexo\hexo\node_modules\hexo\lib\theme\view.js:119:22) at Theme._View.View.View.renderSync (D:\www\hexo\hexo\node_modules\hexo\lib\theme\view.js:48:23) at Object.partial (D:\www\hexo\hexo\node_modules\hexo\lib\plugins\helper\partial.js:34:15) at eval (eval at compile (D:\www\hexo\hexo\node_modules\ejs\lib\ejs.js:633:12), :11:17) at returnedFn (D:\www\hexo\hexo\node_modules\ejs\lib\ejs.js:668:17) at Theme._View.View._compiled (D:\www\hexo\hexo\node_modules\hexo\lib\theme\view.js:123:48) at Theme._View.View.View.render (D:\www\hexo\hexo\node_modules\hexo\lib\theme\view.js:29:15) at D:\www\hexo\hexo\node_modules\hexo\lib\theme\view.js:40:23 at tryCatcher (D:\www\hexo\hexo\node_modules\bluebird\js\release\util.js:16:23) at Promise._settlePromiseFromHandler (D:\www\hexo\hexo\node_modules\bluebird\js\release\promise.js:547:31) at Promise._settlePromise (D:\www\hexo\hexo\node_modules\bluebird\js\release\promise.js:604:18) at Promise._settlePromise0 (D:\www\hexo\hexo\node_modules\bluebird\js\release\promise.js:649:10) at Promise._settlePromises (D:\www\hexo\hexo\node_modules\bluebird\js\release\promise.js:729:18) at _drainQueueStep (D:\www\hexo\hexo\node_modules\bluebird\js\release\async.js:93:12) at _drainQueue (D:\www\hexo\hexo\node_modules\bluebird\js\release\async.js:86:9) at Async._drainQueues (D:\www\hexo\hexo\node_modules\bluebird\js\release\async.js:102:5) at Immediate.Async.drainQueues [as _onImmediate] (D:\www\hexo\hexo\node_modules\bluebird\js\release\async.js:15:14) at processImmediate (internal/timers.js:439:21)

切换为master分支,解决了

哈哈,还特地使用 card分支。不过Linux系统使用card 没问题。Windows10系统应该是这个问题了

sugejie commented 4 years ago

card分支,我也遇到了这个问题,调试后发现是数组 ["atom.xml"] 调用 startsWith 方法引起的,稍微改动下 javascript 就可以了。

LJJ0718 commented 4 years ago

ERROR Render HTML failed: index.html 咋解决

it-beige commented 4 years ago

同问 ERROR Render HTML failed: index.html 咋解决

it-beige commented 4 years ago

同问 ERROR Render HTML failed: index.html 咋解决

定位错误位置修改下源码就行了,具体位置不记得了,需要的话可以发一份修改过的给你,加q:861031836

你的qq设定了问题, 加不上, 如果可以麻烦加下我的q: 1119514898 谢谢啦