Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Cannot read property 'compile' of undefined with Hexo 3.2.0 #1793

Closed
LouisBarranqueiro opened this issue Mar 1, 2016 · 28 comments

Comments

@LouisBarranqueiro
Copy link
Member

Hey,

since I updated to the new Hexo version (3.2.0), when i run hexo g, it outputs :

ERROR Process failed: source/_css/layout/_sidebar.scss
TypeError: Cannot read property 'compile' of undefined
    at View._precompile (/Users/louis/Versionning/Personnal/hexo-blog/node_modules/hexo/lib/theme/view.js:104:22)
    at View (/Users/louis/Versionning/Personnal/hexo-blog/node_modules/hexo/lib/theme/view.js:13:8)
    at new Theme._View.View (/Users/louis/Versionning/Personnal/hexo-blog/node_modules/hexo/lib/theme/index.js:37:10)
    at Theme.setView (/Users/louis/Versionning/Personnal/hexo-blog/node_modules/hexo/lib/theme/index.js:71:20)
    at /Users/louis/Versionning/Personnal/hexo-blog/node_modules/hexo/lib/theme/processors/view.js:14:14
    at tryCatcher (/Users/louis/Versionning/Personnal/hexo-blog/node_modules/hexo/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/Users/louis/Versionning/Personnal/hexo-blog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:503:31)
    at Promise._settlePromise (/Users/louis/Versionning/Personnal/hexo-blog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:560:18)
    at Promise._settlePromise0 (/Users/louis/Versionning/Personnal/hexo-blog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:605:10)
    at Promise._settlePromises (/Users/louis/Versionning/Personnal/hexo-blog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:684:18)
    at Promise._fulfill (/Users/louis/Versionning/Personnal/hexo-blog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:629:18)
    at Promise._resolveCallback (/Users/louis/Versionning/Personnal/hexo-blog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:424:57)
    at Promise._settlePromiseFromHandler (/Users/louis/Versionning/Personnal/hexo-blog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:515:17)
    at Promise._settlePromise (/Users/louis/Versionning/Personnal/hexo-blog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:560:18)
    at Promise._settlePromise0 (/Users/louis/Versionning/Personnal/hexo-blog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:605:10)
    at Promise._settlePromises (/Users/louis/Versionning/Personnal/hexo-blog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:684:18)
    at Promise._fulfill (/Users/louis/Versionning/Personnal/hexo-blog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:629:18)
    at /Users/louis/Versionning/Personnal/hexo-blog/node_modules/hexo/node_modules/bluebird/js/release/nodeback.js:42:21
    at /Users/louis/Versionning/Personnal/hexo-blog/node_modules/hexo/node_modules/hexo-fs/node_modules/graceful-fs/graceful-fs.js:78:16
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:380:3)

It is trying to process scss files while these files are put in source/_css/, it should ignored this folder.

OS : OSX 10.11.3
Node : 4.0.0
NPM : 2.14.2

@LouisBarranqueiro LouisBarranqueiro changed the title TypeError: Cannot read property 'compile' of undefined TypeError: Cannot read property 'compile' of undefined with Hexo 3.2.0 Mar 1, 2016
@oshliaer
Copy link

oshliaer commented Mar 1, 2016

Same errors on Ubuntu and Windows.

@samwhelp
Copy link

samwhelp commented Mar 1, 2016

I guess it should be solved to update hexo-cli.
run $ npm install hexo-cli -g again.

hexo: 3.2.0
hexo-cli: 1.0.1

Just guess! I'm not sure.

Hexo 3.2 Released / Templates precompilation

@oshliaer
Copy link

oshliaer commented Mar 1, 2016

I don't really understand, but it seems ./hexo/lib/plugins/renderer/ is needed to have a sass renderer. Is it true?

@samwhelp
Copy link

samwhelp commented Mar 1, 2016

I upgrade hexo to 3.2.0.

Some error occur.

And I let hexo-cli upgrade to 1.0.1 to solve problem.

This way may be not fit your situation.

Just for reference.

@oshliaer
Copy link

oshliaer commented Mar 1, 2016

Ok. It's strange. Because there is the article about ignoring files

source
Source folder. Place your assets (e.g. CSS and JavaScript files) here. Hexo ignores hidden files and files or folders prefixed with _ (underscore).

The folder _css should be ignoring and passed as assets.

@Waydrow
Copy link

Waydrow commented Mar 4, 2016

I also got this problem,
I use travis-ci for auto deploy,
but now it can't make it

@flexgrip
Copy link

flexgrip commented Mar 7, 2016

Same here. Latest version of everything.

@laurekamalandua
Copy link

same issues here, version 3.2.0 and cli 1.0.1.
issues does not occur on 3.1.1

@yscoder
Copy link
Member

yscoder commented Mar 11, 2016

I also encountered this problem after update to the latest today.
Modify the _config.yml file to solve.

plugins:
- hexo-generator-feed
- hexo-generator-sitemap
- hexo-generator-tag
- hexo-generator-category
- hexo-renderer-less
- hexo-renderer-ejs
- hexo-generator-index

I guess low version some of the default plug-in dependencies have been removed.

@LouisBarranqueiro
Copy link
Member Author

Still the same error. Define plugins list in configuration file only disable auto detection of plugins

If you set plugins list in _config.yml. Hexo will not detect plugin list automatically.

@dev-dude
Copy link

Problem does not exist in hexo 3.1.1. Please fix.

@steermomo
Copy link

Same here

hexo: 3.2.0
hexo-cli: 1.0.1
os: Windows_NT 10.0.10586 win32 x64
http_parser: 2.5.2
node: 4.4.1
v8: 4.5.103.35
uv: 1.8.0
zlib: 1.2.8
ares: 1.10.1-DEV
icu: 56.1
modules: 46
openssl: 1.0.2g

While I using other themes this problem happen,except landscape
Try all day to find what happened

@wykydtronik
Copy link

I'm getting the same error with Win10. I tried this with an existing hexo blog and a fresh install.

hexo: 3.2.0
hexo-cli: 1.0.1
os: Windows_NT 10.0.10240 win32 x64
http_parser: 2.6.2
node: 5.8.0
v8: 4.6.85.31
uv: 1.8.0
zlib: 1.2.8
ares: 1.10.1-DEV
icu: 56.1
modules: 47
openssl: 1.0.2g

{
"name": "hexo-site",
"version": "0.0.0",
"private": true,
"hexo": {
"version": "3.2.0"
},
"dependencies": {
"hexo": "^3.1.1",
"hexo-generator-archive": "^0.1.4",
"hexo-generator-category": "^0.1.3",
"hexo-generator-index": "^0.2.0",
"hexo-generator-tag": "^0.2.0",
"hexo-renderer-ejs": "^0.1.1",
"hexo-renderer-stylus": "^0.3.0",
"hexo-renderer-marked": "^0.2.9",
"hexo-server": "^0.1.3"
}
}

@wololock
Copy link

According to 3.2.0 release docs:

If you set plugins list in _config.yml. Hexo will not detect plugin list automatically.

I run into the same issue when I added hexo-generator-cname plugin and have defined:

plugins:
- hexo-generator-cname

in _config.yml file. After removing plugins section, everything worked fine.

@tidus5
Copy link

tidus5 commented Mar 28, 2016

Hello, author of hexo have replied to this issue. See #1807
These DS_Store files were generated in OSX.
And in Win or Linux , you can just delete these files. It may be commited by the theme author.
After deleting DS_Store files , the error disappeared.

@FionaT
Copy link

FionaT commented Apr 2, 2016

It seems that the only solution is to downgrade hexo to version 3.1.1, but How to downgrade Hexo from version 3.2.0 to 3.1.1 ??? Thanks

@LouisBarranqueiro
Copy link
Member Author

  1. update package.json of your blog with "hexo":"3.1.1"
  2. remove node_modulesfolder
  3. run npm install

@flexgrip
Copy link

So I guess I'm lost. Is there any way to get this to work on 3.2.0 so I don't have to manually downgrade all of my users? No workarounds?

@LouisBarranqueiro
Copy link
Member Author

It output some errors, but hexo g and hexo s should works. It works on my computer :
OS : OSX 10.11.4

  • Node : 5.7.1
  • hexo-cli : 1.0.1
  • theme : tranquilpeak v1.7.1

    so I don't have to manually downgrade all of my users?

What do you mean?

@flexgrip
Copy link

I have people pulling in the hexo repo to contribute content. And I've had to change the package.json manually to 3.1.1 to get by the errors. That's all I mean.

@LouisBarranqueiro
Copy link
Member Author

If it doesn't work, yeah downgrade.

@leesei
Copy link
Member

leesei commented Apr 17, 2016

I did some study and it's because we changed our process pipeline in 3.2.
Causing a latent bug in hexo/lib/theme/processors/view.js to surface.

See #1855
@tommy351 please take a look and advise

@princesscici
Copy link

The problem can be solved by downgrading Hexo from version 3.2.0 to 3.1.1
npm uninstall hexo
npm install hexo@3.1.1 --save
And then, rebuild the folder by hexo init and npm install
Then, the version of hexo is downgraded to 3.1.1 and all errors gone.
Maybe it will help you.

@fantiq
Copy link

fantiq commented May 30, 2016

when i delete the files under themes/tranquilpeak/source /_* , and it is work .....

@LouisBarranqueiro
Copy link
Member Author

LouisBarranqueiro commented May 30, 2016

@fantiq yeah but you are deleting the source of the theme man... :D read this to fix temporarily this bug : LouisBarranqueiro/hexo-theme-tranquilpeak#224 (comment)

@leesei
Copy link
Member

leesei commented May 30, 2016

@LouisBarranqueiro do you agree to close this issue and track with #1855?
The culprit is layout/ in path and I've also added the workarounds to the issue.

@LouisBarranqueiro
Copy link
Member Author

yeah, it's perfect. TY

@dinphy
Copy link

dinphy commented May 31, 2018

我使用indigo主题遇到了问题,谁能帮忙解决一下啊,急!(I have encountered problems with the indigo theme. Who can help with this?)

(node:284) [DEP0061] DeprecationWarning: fs.SyncWriteStream is deprecated.
INFO  Start processing
INFO  Files loaded in 252 ms
ERROR D:\testHexo\themes\indigo\layout\archive.ejs:58
    56|                     <%- /(?||!)$/.test(post.title) ? post.title : post.title + '。' %>
    57|                 </a>
 >> 58|                 <a class="catagories" href="/categories/<%- post.categories.data[0].name %>" target="_blank">
    59|                     <%- post.categories.data[0].name %>
    60|                 </a>
    61|             </div>
Cannot read property 'name' of undefined
TypeError: D:\testHexo\themes\indigo\layout\archive.ejs:58
    56|                     <%- /(?||!)$/.test(post.title) ? post.title : post.title + '。' %>
    57|                 </a>
 >> 58|                 <a class="catagories" href="/categories/<%- post.categories.data[0].name %>" target="_blank">
    59|                     <%- post.categories.data[0].name %>
    60|                 </a>
    61|             </div>
Cannot read property 'name' of undefined
    at eval (eval at compile (D:\testHexo\node_modules\ejs\lib\ejs.js:618:12), <anonymous>:88:41)
    at Array.forEach (<anonymous>)
    at eval (eval at compile (D:\testHexo\node_modules\ejs\lib\ejs.js:618:12), <anonymous>:50:15)
    at returnedFn (D:\testHexo\node_modules\ejs\lib\ejs.js:653:17)
    at Theme._View.View._compiled.locals [as _compiled] (D:\testHexo\node_modules\hexo\lib\theme\view.js:124:48)
    at Theme._View.View.View.render (D:\testHexo\node_modules\hexo\lib\theme\view.js:29:15)
    at route.set (D:\testHexo\node_modules\hexo\lib\hexo\index.js:386:29)
    at tryCatcher (D:\testHexo\node_modules\bluebird\js\release\util.js:16:23)
    at D:\testHexo\node_modules\bluebird\js\release\method.js:15:34
    at RouteStream._read (D:\testHexo\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:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)
ERROR D:\testHexo\themes\indigo\layout\archive.ejs:58
    56|                     <%- /(?||!)$/.test(post.title) ? post.title : post.title + '。' %>
    57|                 </a>
 >> 58|                 <a class="catagories" href="/categories/<%- post.categories.data[0].name %>" target="_blank">
    59|                     <%- post.categories.data[0].name %>
    60|                 </a>
    61|             </div>
Cannot read property 'name' of undefined
TypeError: D:\testHexo\themes\indigo\layout\archive.ejs:58
    56|                     <%- /(?||!)$/.test(post.title) ? post.title : post.title + '。' %>
    57|                 </a>
 >> 58|                 <a class="catagories" href="/categories/<%- post.categories.data[0].name %>" target="_blank">
    59|                     <%- post.categories.data[0].name %>
    60|                 </a>
    61|             </div>
Cannot read property 'name' of undefined
    at eval (eval at compile (D:\testHexo\node_modules\ejs\lib\ejs.js:618:12), <anonymous>:88:41)
    at Array.forEach (<anonymous>)
    at eval (eval at compile (D:\testHexo\node_modules\ejs\lib\ejs.js:618:12), <anonymous>:50:15)
    at returnedFn (D:\testHexo\node_modules\ejs\lib\ejs.js:653:17)
    at Theme._View.View._compiled.locals [as _compiled] (D:\testHexo\node_modules\hexo\lib\theme\view.js:124:48)
    at Theme._View.View.View.render (D:\testHexo\node_modules\hexo\lib\theme\view.js:29:15)
    at route.set (D:\testHexo\node_modules\hexo\lib\hexo\index.js:386:29)
    at tryCatcher (D:\testHexo\node_modules\bluebird\js\release\util.js:16:23)
    at D:\testHexo\node_modules\bluebird\js\release\method.js:15:34
    at RouteStream._read (D:\testHexo\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:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)
ERROR D:\testHexo\themes\indigo\layout\archive.ejs:58
    56|                     <%- /(?||!)$/.test(post.title) ? post.title : post.title + '。' %>
    57|                 </a>
 >> 58|                 <a class="catagories" href="/categories/<%- post.categories.data[0].name %>" target="_blank">
    59|                     <%- post.categories.data[0].name %>
    60|                 </a>
    61|             </div>
Cannot read property 'name' of undefined
TypeError: D:\testHexo\themes\indigo\layout\archive.ejs:58
    56|                     <%- /(?||!)$/.test(post.title) ? post.title : post.title + '。' %>
    57|                 </a>
 >> 58|                 <a class="catagories" href="/categories/<%- post.categories.data[0].name %>" target="_blank">
    59|                     <%- post.categories.data[0].name %>
    60|                 </a>
    61|             </div>
Cannot read property 'name' of undefined
    at eval (eval at compile (D:\testHexo\node_modules\ejs\lib\ejs.js:618:12), <anonymous>:88:41)
    at Array.forEach (<anonymous>)
    at eval (eval at compile (D:\testHexo\node_modules\ejs\lib\ejs.js:618:12), <anonymous>:50:15)
    at returnedFn (D:\testHexo\node_modules\ejs\lib\ejs.js:653:17)
    at Theme._View.View._compiled.locals [as _compiled] (D:\testHexo\node_modules\hexo\lib\theme\view.js:124:48)
    at Theme._View.View.View.render (D:\testHexo\node_modules\hexo\lib\theme\view.js:29:15)
    at route.set (D:\testHexo\node_modules\hexo\lib\hexo\index.js:386:29)
    at tryCatcher (D:\testHexo\node_modules\bluebird\js\release\util.js:16:23)
    at D:\testHexo\node_modules\bluebird\js\release\method.js:15:34
    at RouteStream._read (D:\testHexo\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:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)
ERROR D:\testHexo\themes\indigo\layout\layout.ejs:3
    1| <!DOCTYPE html>
    2| <html>
 >> 3|     <%- partial('_partial/head') %>
    4|
    5| <body>
    6|     <script>
D:\testHexo\themes\indigo\layout\_partial\head.ejs:37
    35|         }
    36|     %>
 >> 37|     <title><% if (title){ %><%= title %> | <% } %><%= config.title %> | <%= config.subtitle.replace(/<[^>]*>/g, '') %></title>
    38|     <%
    39|         var keyWords = config.keywords;
    40|         if(page.tags){
Cannot read property 'replace' of null
TypeError: D:\testHexo\themes\indigo\layout\layout.ejs:3
    1| <!DOCTYPE html>
    2| <html>
 >> 3|     <%- partial('_partial/head') %>
    4|
    5| <body>
    6|     <script>
D:\testHexo\themes\indigo\layout\_partial\head.ejs:37
    35|         }
    36|     %>
 >> 37|     <title><% if (title){ %><%= title %> | <% } %><%= config.title %> | <%= config.subtitle.replace(/<[^>]*>/g, '') %></title>
    38|     <%
    39|         var keyWords = config.keywords;
    40|         if(page.tags){
Cannot read property 'replace' of null
    at eval (eval at compile (D:\testHexo\node_modules\ejs\lib\ejs.js:618:12), <anonymous>:64:42)
    at returnedFn (D:\testHexo\node_modules\ejs\lib\ejs.js:653:17)
    at Theme._View.View._compiledSync.locals [as _compiledSync] (D:\testHexo\node_modules\hexo\lib\theme\view.js:120:22)
    at Theme._View.View.View.renderSync (D:\testHexo\node_modules\hexo\lib\theme\view.js:48:23)
    at Object.partial (D:\testHexo\node_modules\hexo\lib\plugins\helper\partial.js:39:15)
    at Object.wrapper [as partial] (D:\testHexo\node_modules\lodash\lodash.js:4949:19)
    at eval (eval at compile (D:\testHexo\node_modules\ejs\lib\ejs.js:618:12), <anonymous>:11:17)
    at returnedFn (D:\testHexo\node_modules\ejs\lib\ejs.js:653:17)
    at Theme._View.View._compiled.locals [as _compiled] (D:\testHexo\node_modules\hexo\lib\theme\view.js:124:48)
    at Theme._View.View.View.render (D:\testHexo\node_modules\hexo\lib\theme\view.js:29:15)
    at _compiled.then.result (D:\testHexo\node_modules\hexo\lib\theme\view.js:40:23)
    at tryCatcher (D:\testHexo\node_modules\bluebird\js\release\util.js:16:23)
    at Promise._settlePromiseFromHandler (D:\testHexo\node_modules\bluebird\js\release\promise.js:512:31)
    at Promise._settlePromise (D:\testHexo\node_modules\bluebird\js\release\promise.js:569:18)
    at Promise._settlePromise0 (D:\testHexo\node_modules\bluebird\js\release\promise.js:614:10)
    at Promise._settlePromises (D:\testHexo\node_modules\bluebird\js\release\promise.js:693:18)
    at Async._drainQueue (D:\testHexo\node_modules\bluebird\js\release\async.js:133:16)
    at Async._drainQueues (D:\testHexo\node_modules\bluebird\js\release\async.js:143:10)
    at Immediate.Async.drainQueues (D:\testHexo\node_modules\bluebird\js\release\async.js:17:14)
    at runCallback (timers.js:810:20)
    at tryOnImmediate (timers.js:768:5)
    at processImmediate [as _immediateCallback] (timers.js:745:5)
ERROR D:\testHexo\themes\indigo\layout\layout.ejs:3
    1| <!DOCTYPE html>
    2| <html>
 >> 3|     <%- partial('_partial/head') %>
    4|
    5| <body>
    6|     <script>
D:\testHexo\themes\indigo\layout\_partial\head.ejs:37
    35|         }
    36|     %>
 >> 37|     <title><% if (title){ %><%= title %> | <% } %><%= config.title %> | <%= config.subtitle.replace(/<[^>]*>/g, '') %></title>
    38|     <%
    39|         var keyWords = config.keywords;
    40|         if(page.tags){
Cannot read property 'replace' of null
TypeError: D:\testHexo\themes\indigo\layout\layout.ejs:3
    1| <!DOCTYPE html>
    2| <html>
 >> 3|     <%- partial('_partial/head') %>
    4|
    5| <body>
    6|     <script>
D:\testHexo\themes\indigo\layout\_partial\head.ejs:37
    35|         }
    36|     %>
 >> 37|     <title><% if (title){ %><%= title %> | <% } %><%= config.title %> | <%= config.subtitle.replace(/<[^>]*>/g, '') %></title>
    38|     <%
    39|         var keyWords = config.keywords;
    40|         if(page.tags){
Cannot read property 'replace' of null
    at eval (eval at compile (D:\testHexo\node_modules\ejs\lib\ejs.js:618:12), <anonymous>:64:42)
    at returnedFn (D:\testHexo\node_modules\ejs\lib\ejs.js:653:17)
    at Theme._View.View._compiledSync.locals [as _compiledSync] (D:\testHexo\node_modules\hexo\lib\theme\view.js:120:22)
    at Theme._View.View.View.renderSync (D:\testHexo\node_modules\hexo\lib\theme\view.js:48:23)
    at Object.partial (D:\testHexo\node_modules\hexo\lib\plugins\helper\partial.js:39:15)
    at Object.wrapper [as partial] (D:\testHexo\node_modules\lodash\lodash.js:4949:19)
    at eval (eval at compile (D:\testHexo\node_modules\ejs\lib\ejs.js:618:12), <anonymous>:11:17)
    at returnedFn (D:\testHexo\node_modules\ejs\lib\ejs.js:653:17)
    at Theme._View.View._compiled.locals [as _compiled] (D:\testHexo\node_modules\hexo\lib\theme\view.js:124:48)
    at Theme._View.View.View.render (D:\testHexo\node_modules\hexo\lib\theme\view.js:29:15)
    at _compiled.then.result (D:\testHexo\node_modules\hexo\lib\theme\view.js:40:23)
    at tryCatcher (D:\testHexo\node_modules\bluebird\js\release\util.js:16:23)
    at Promise._settlePromiseFromHandler (D:\testHexo\node_modules\bluebird\js\release\promise.js:512:31)
    at Promise._settlePromise (D:\testHexo\node_modules\bluebird\js\release\promise.js:569:18)
    at Promise._settlePromise0 (D:\testHexo\node_modules\bluebird\js\release\promise.js:614:10)
    at Promise._settlePromises (D:\testHexo\node_modules\bluebird\js\release\promise.js:693:18)
    at Async._drainQueue (D:\testHexo\node_modules\bluebird\js\release\async.js:133:16)
    at Async._drainQueues (D:\testHexo\node_modules\bluebird\js\release\async.js:143:10)
    at Immediate.Async.drainQueues (D:\testHexo\node_modules\bluebird\js\release\async.js:17:14)
    at runCallback (timers.js:810:20)
    at tryOnImmediate (timers.js:768:5)
    at processImmediate [as _immediateCallback] (timers.js:745:5)
ERROR D:\testHexo\themes\indigo\layout\layout.ejs:3
    1| <!DOCTYPE html>
    2| <html>
 >> 3|     <%- partial('_partial/head') %>
    4|
    5| <body>
    6|     <script>
D:\testHexo\themes\indigo\layout\_partial\head.ejs:37
    35|         }
    36|     %>
 >> 37|     <title><% if (title){ %><%= title %> | <% } %><%= config.title %> | <%= config.subtitle.replace(/<[^>]*>/g, '') %></title>
    38|     <%
    39|         var keyWords = config.keywords;
    40|         if(page.tags){
Cannot read property 'replace' of null
TypeError: D:\testHexo\themes\indigo\layout\layout.ejs:3
    1| <!DOCTYPE html>
    2| <html>
 >> 3|     <%- partial('_partial/head') %>
    4|
    5| <body>
    6|     <script>
D:\testHexo\themes\indigo\layout\_partial\head.ejs:37
    35|         }
    36|     %>
 >> 37|     <title><% if (title){ %><%= title %> | <% } %><%= config.title %> | <%= config.subtitle.replace(/<[^>]*>/g, '') %></title>
    38|     <%
    39|         var keyWords = config.keywords;
    40|         if(page.tags){
Cannot read property 'replace' of null
    at eval (eval at compile (D:\testHexo\node_modules\ejs\lib\ejs.js:618:12), <anonymous>:64:42)
    at returnedFn (D:\testHexo\node_modules\ejs\lib\ejs.js:653:17)
    at Theme._View.View._compiledSync.locals [as _compiledSync] (D:\testHexo\node_modules\hexo\lib\theme\view.js:120:22)
    at Theme._View.View.View.renderSync (D:\testHexo\node_modules\hexo\lib\theme\view.js:48:23)
    at Object.partial (D:\testHexo\node_modules\hexo\lib\plugins\helper\partial.js:39:15)
    at Object.wrapper [as partial] (D:\testHexo\node_modules\lodash\lodash.js:4949:19)
    at eval (eval at compile (D:\testHexo\node_modules\ejs\lib\ejs.js:618:12), <anonymous>:11:17)
    at returnedFn (D:\testHexo\node_modules\ejs\lib\ejs.js:653:17)
    at Theme._View.View._compiled.locals [as _compiled] (D:\testHexo\node_modules\hexo\lib\theme\view.js:124:48)
    at Theme._View.View.View.render (D:\testHexo\node_modules\hexo\lib\theme\view.js:29:15)
    at _compiled.then.result (D:\testHexo\node_modules\hexo\lib\theme\view.js:40:23)
    at tryCatcher (D:\testHexo\node_modules\bluebird\js\release\util.js:16:23)
    at Promise._settlePromiseFromHandler (D:\testHexo\node_modules\bluebird\js\release\promise.js:512:31)
    at Promise._settlePromise (D:\testHexo\node_modules\bluebird\js\release\promise.js:569:18)
    at Promise._settlePromise0 (D:\testHexo\node_modules\bluebird\js\release\promise.js:614:10)
    at Promise._settlePromises (D:\testHexo\node_modules\bluebird\js\release\promise.js:693:18)
    at Async._drainQueue (D:\testHexo\node_modules\bluebird\js\release\async.js:133:16)
    at Async._drainQueues (D:\testHexo\node_modules\bluebird\js\release\async.js:143:10)
    at Immediate.Async.drainQueues (D:\testHexo\node_modules\bluebird\js\release\async.js:17:14)
    at runCallback (timers.js:810:20)
    at tryOnImmediate (timers.js:768:5)
    at processImmediate [as _immediateCallback] (timers.js:745:5)
ERROR D:\testHexo\themes\indigo\layout\layout.ejs:3
    1| <!DOCTYPE html>
    2| <html>
 >> 3|     <%- partial('_partial/head') %>
    4|
    5| <body>
    6|     <script>
D:\testHexo\themes\indigo\layout\_partial\head.ejs:37
    35|         }
    36|     %>
 >> 37|     <title><% if (title){ %><%= title %> | <% } %><%= config.title %> | <%= config.subtitle.replace(/<[^>]*>/g, '') %></title>
    38|     <%
    39|         var keyWords = config.keywords;
    40|         if(page.tags){
Cannot read property 'replace' of null
TypeError: D:\testHexo\themes\indigo\layout\layout.ejs:3
    1| <!DOCTYPE html>
    2| <html>
 >> 3|     <%- partial('_partial/head') %>
    4|
    5| <body>
    6|     <script>
D:\testHexo\themes\indigo\layout\_partial\head.ejs:37
    35|         }
    36|     %>
 >> 37|     <title><% if (title){ %><%= title %> | <% } %><%= config.title %> | <%= config.subtitle.replace(/<[^>]*>/g, '') %></title>
    38|     <%
    39|         var keyWords = config.keywords;
    40|         if(page.tags){
Cannot read property 'replace' of null
    at eval (eval at compile (D:\testHexo\node_modules\ejs\lib\ejs.js:618:12), <anonymous>:64:42)
    at returnedFn (D:\testHexo\node_modules\ejs\lib\ejs.js:653:17)
    at Theme._View.View._compiledSync.locals [as _compiledSync] (D:\testHexo\node_modules\hexo\lib\theme\view.js:120:22)
    at Theme._View.View.View.renderSync (D:\testHexo\node_modules\hexo\lib\theme\view.js:48:23)
    at Object.partial (D:\testHexo\node_modules\hexo\lib\plugins\helper\partial.js:39:15)
    at Object.wrapper [as partial] (D:\testHexo\node_modules\lodash\lodash.js:4949:19)
    at eval (eval at compile (D:\testHexo\node_modules\ejs\lib\ejs.js:618:12), <anonymous>:11:17)
    at returnedFn (D:\testHexo\node_modules\ejs\lib\ejs.js:653:17)
    at Theme._View.View._compiled.locals [as _compiled] (D:\testHexo\node_modules\hexo\lib\theme\view.js:124:48)
    at Theme._View.View.View.render (D:\testHexo\node_modules\hexo\lib\theme\view.js:29:15)
    at _compiled.then.result (D:\testHexo\node_modules\hexo\lib\theme\view.js:40:23)
    at tryCatcher (D:\testHexo\node_modules\bluebird\js\release\util.js:16:23)
    at Promise._settlePromiseFromHandler (D:\testHexo\node_modules\bluebird\js\release\promise.js:512:31)
    at Promise._settlePromise (D:\testHexo\node_modules\bluebird\js\release\promise.js:569:18)
    at Promise._settlePromise0 (D:\testHexo\node_modules\bluebird\js\release\promise.js:614:10)
    at Promise._settlePromises (D:\testHexo\node_modules\bluebird\js\release\promise.js:693:18)
    at Async._drainQueue (D:\testHexo\node_modules\bluebird\js\release\async.js:133:16)
    at Async._drainQueues (D:\testHexo\node_modules\bluebird\js\release\async.js:143:10)
    at Immediate.Async.drainQueues (D:\testHexo\node_modules\bluebird\js\release\async.js:17:14)
    at runCallback (timers.js:810:20)
    at tryOnImmediate (timers.js:768:5)
    at processImmediate [as _immediateCallback] (timers.js:745:5)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests