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 'replace' of null (`url` in _config.yml is filled) #3859

Open
TingxunShi opened this issue Nov 13, 2019 · 3 comments

Comments

@TingxunShi
Copy link

@TingxunShi TingxunShi commented Nov 13, 2019

Check List

Please check followings before submitting a new issue.

  • I have already read Docs page & Troubleshooting page
  • I have already searched existing issues and they are not help to me
  • I examined error or warning messages and it's difficult to solve
  • Using the latest version of Hexo (run hexo version to check)
  • Node.js is higher than 8.6.0

Question

Error message below is shown (I'm sure that I have filled in url: field in my hexo _config.yml)

[myname@myname-pc blog_src]$ hexo g
INFO  Start processing
INFO  Files loaded in 378 ms
ERROR Render HTML failed: about/index.html
TypeError: Cannot read property 'replace' of null
    at Hexo.externalLinkFilter (/home/myname/Projects/blog_src/node_modules/hexo/lib/plugins/filter/after_render/external_link.js:45:15)                                                                                                                               
    at Hexo.tryCatcher (/home/myname/Projects/blog_src/node_modules/bluebird/js/release/util.js:16:23)
    at Hexo.<anonymous> (/home/myname/Projects/blog_src/node_modules/bluebird/js/release/method.js:15:34)
    at /home/myname/Projects/blog_src/node_modules/hexo/lib/extend/filter.js:60:50
    at tryCatcher (/home/myname/Projects/blog_src/node_modules/bluebird/js/release/util.js:16:23)
    at Object.gotValue (/home/myname/Projects/blog_src/node_modules/bluebird/js/release/reduce.js:166:18)
    at Object.gotAccum (/home/myname/Projects/blog_src/node_modules/bluebird/js/release/reduce.js:155:25)
    at Object.tryCatcher (/home/myname/Projects/blog_src/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/home/myname/Projects/blog_src/node_modules/bluebird/js/release/promise.js:547:31)
    at Promise._settlePromise (/home/myname/Projects/blog_src/node_modules/bluebird/js/release/promise.js:604:18)
    at Promise._settlePromiseCtx (/home/myname/Projects/blog_src/node_modules/bluebird/js/release/promise.js:641:10)
    at _drainQueueStep (/home/myname/Projects/blog_src/node_modules/bluebird/js/release/async.js:97:12)
    at _drainQueue (/home/myname/Projects/blog_src/node_modules/bluebird/js/release/async.js:86:9)
    at Async._drainQueues (/home/myname/Projects/blog_src/node_modules/bluebird/js/release/async.js:102:5)
    at Immediate.Async.drainQueues [as _onImmediate] (/home/myname/Projects/blog_src/node_modules/bluebird/js/release/async.js:15:14)                                                                                                                                  
    at processImmediate (internal/timers.js:439:21)

Environment & Settings

Node.js & npm version

hexo: 4.0.0
hexo-cli: 3.1.0
os: Linux 5.3.8-3-MANJARO linux x64
node: 13.1.0
v8: 7.8.279.17-node.19
uv: 1.33.1
zlib: 1.2.11
brotli: 1.0.7
ares: 1.15.0
modules: 79
nghttp2: 1.39.2
napi: 5
llhttp: 1.1.4
openssl: 1.1.1d
cldr: 35.1
icu: 64.2
tz: 2019a
unicode: 12.1

Your site _config.yml (Optional)

Your theme _config.yml (Optional)

Hexo and Plugin version(npm ls --depth 0)

hexo-site@0.0.0 /home/txshi/Projects/blog_src
├── hexo@4.0.0
├── hexo-generator-archive@1.0.0
├── hexo-generator-category@1.0.0
├── hexo-generator-index@1.0.0
├── hexo-generator-tag@1.0.0
├── hexo-renderer-ejs@1.0.0
├── hexo-renderer-marked@2.0.0
├── hexo-renderer-stylus@1.1.0
└── hexo-server@1.0.0

Your package.json package.json

{
  "name": "hexo-site",
  "version": "0.0.0",
  "private": true,
  "scripts": {
    "build": "hexo generate",
    "clean": "hexo clean",
    "deploy": "hexo deploy",
    "server": "hexo server"
  },
  "hexo": {
    "version": "4.0.0"
  },
  "dependencies": {
    "hexo": "^4.0.0",
    "hexo-generator-archive": "^1.0.0",
    "hexo-generator-category": "^1.0.0",
    "hexo-generator-index": "^1.0.0",
    "hexo-generator-tag": "^1.0.0",
    "hexo-renderer-ejs": "^1.0.0",
    "hexo-renderer-stylus": "^1.1.0",
    "hexo-renderer-marked": "^2.0.0",
    "hexo-server": "^1.0.0"
  }
}

Others

@curbengh

This comment has been minimized.

Copy link
Contributor

@curbengh curbengh commented Nov 27, 2019

Does source/about/index.md have any content?

Can you try disable external_link: and run hexo clean && hexo g?

external_link:
  enable: false
@a-runner

This comment has been minimized.

Copy link

@a-runner a-runner commented Dec 2, 2019

i have the same problem!

@TingxunShi

This comment has been minimized.

Copy link
Author

@TingxunShi TingxunShi commented Dec 11, 2019

Does source/about/index.md have any content?

Can you try disable external_link: and run hexo clean && hexo g?

external_link:
  enable: false

Hi @curbengh , sorry for the late reply. I have something in source/about/index.md.

I tried to disable external_link and generation did worked. However when I ran hexo s and visited localhost:4000, there is nothing in the browser but only a "null" in the top left corner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.