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

YAML files in source folder make icarus crash #1249

Open
noraj opened this issue Dec 18, 2023 · 4 comments
Open

YAML files in source folder make icarus crash #1249

noraj opened this issue Dec 18, 2023 · 4 comments
Labels
discussion Any questions about this theme.

Comments

@noraj
Copy link
Contributor

noraj commented Dec 18, 2023

Describe the bug

I have YAML files in source/, e.g., source/_authors/noraj.yml used for hexo-multiauthor

name: noraj (Alexandre ZANNI)
about: Cybersecurity engineer & Pentester

But when building (hexo g), I encounter those warnings:

Error: Inferno Error: normalization received an object that's not a valid VNode, you should stringify it first or fix createVNode flags. Object: "{"name":"noraj (Alexandre ZANNI)","about":"Cybersecurity engineer &
 Pentester","id":"noraj","source":"_authors/noraj.yml","_id":"clqbh783u02knuslk9yo4dxrj"}".                                                                                                                          
    at throwError (/home/noraj/Dev/Rawsec-website/node_modules/inferno/dist/index.cjs.js:36:11)                                                                                                                      
    at throwIfObjectIsNotVNode (/home/noraj/Dev/Rawsec-website/node_modules/inferno/dist/index.cjs.js:367:9)                                                                                                         
    at normalizeChildren (/home/noraj/Dev/Rawsec-website/node_modules/inferno/dist/index.cjs.js:617:21)                                                                                                              
    at createVNode (/home/noraj/Dev/Rawsec-website/node_modules/inferno/dist/index.cjs.js:398:9)                                                                                                                     
    at _class.render (/home/noraj/Dev/Rawsec-website/node_modules/hexo-theme-icarus/layout/common/article.jsx:58:41)                                                                                                 
    at renderVNodeToString (/home/noraj/Dev/Rawsec-website/node_modules/inferno-server/dist/index.cjs.js:210:41)                                                                                                     
    at renderVNodeToString (/home/noraj/Dev/Rawsec-website/node_modules/inferno-server/dist/index.cjs.js:337:37)                                                                                                     
    at renderVNodeToString (/home/noraj/Dev/Rawsec-website/node_modules/inferno-server/dist/index.cjs.js:221:20)                                                                                                     
    at renderToString (/home/noraj/Dev/Rawsec-website/node_modules/inferno-server/dist/index.cjs.js:356:12)                                                                                                          
    at /home/noraj/Dev/Rawsec-website/node_modules/hexo-renderer-inferno/lib/compile.js:37:20                                                                                                                        
    at _View._compiled (/home/noraj/Dev/Rawsec-website/node_modules/hexo/lib/theme/view.ts:151:50)                                                                                                                   
    at _View.render (/home/noraj/Dev/Rawsec-website/node_modules/hexo/lib/theme/view.ts:54:17)                                                                                                                       
    at /home/noraj/Dev/Rawsec-website/node_modules/hexo/lib/hexo/index.ts:77:21                                                                                                                                      
    at tryCatcher (/home/noraj/Dev/Rawsec-website/node_modules/bluebird/js/release/util.js:16:23)                                                                                                                    
    at /home/noraj/Dev/Rawsec-website/node_modules/bluebird/js/release/method.js:15:34                                                                                                                               
    at RouteStream._read (/home/noraj/Dev/Rawsec-website/node_modules/hexo/lib/hexo/router.ts:60:5)                                                                                                                  
    at RouteStream.Readable.read (node:internal/streams/readable:737:12)                                                                                                                                             
    at resume_ (node:internal/streams/readable:1255:12)                                                                                                                                                              
    at processTicksAndRejections (node:internal/process/task_queues:82:21)

That becomes an error when serving (hexo s)

Unhandled rejection Error: Inferno Error: normalization received an object that's not a valid VNode, you should stringify it first or fix createVNode flags. Object: "{"name":"noraj (Alexandre ZANNI)","about":"Cybersecurity engineer & Pentester","id":"noraj","source":"_authors/noraj.yml","_id":"clqbh783u02knuslk9yo4dxrj"}".
    at throwError (/home/noraj/Dev/Rawsec-website/node_modules/inferno/dist/index.cjs.js:36:11)
    at throwIfObjectIsNotVNode (/home/noraj/Dev/Rawsec-website/node_modules/inferno/dist/index.cjs.js:367:9)
    at normalizeChildren (/home/noraj/Dev/Rawsec-website/node_modules/inferno/dist/index.cjs.js:617:21)
    at createVNode (/home/noraj/Dev/Rawsec-website/node_modules/inferno/dist/index.cjs.js:398:9)
    at _class.render (/home/noraj/Dev/Rawsec-website/node_modules/hexo-theme-icarus/layout/common/article.jsx:58:41)
    at renderVNodeToString (/home/noraj/Dev/Rawsec-website/node_modules/inferno-server/dist/index.cjs.js:210:41)
    at renderVNodeToString (/home/noraj/Dev/Rawsec-website/node_modules/inferno-server/dist/index.cjs.js:221:20)
    at renderToString (/home/noraj/Dev/Rawsec-website/node_modules/inferno-server/dist/index.cjs.js:356:12)
    at /home/noraj/Dev/Rawsec-website/node_modules/hexo-renderer-inferno/lib/compile.js:37:20
    at _View._compiled (/home/noraj/Dev/Rawsec-website/node_modules/hexo/lib/theme/view.ts:151:50)
    at _View.render (/home/noraj/Dev/Rawsec-website/node_modules/hexo/lib/theme/view.ts:54:17)
    at /home/noraj/Dev/Rawsec-website/node_modules/hexo/lib/hexo/index.ts:77:21
    at tryCatcher (/home/noraj/Dev/Rawsec-website/node_modules/bluebird/js/release/util.js:16:23)
    at /home/noraj/Dev/Rawsec-website/node_modules/bluebird/js/release/method.js:15:34
    at RouteStream._read (/home/noraj/Dev/Rawsec-website/node_modules/hexo/lib/hexo/router.ts:60:5)
    at RouteStream.Readable.read (node:internal/streams/readable:737:12)
    at resume_ (node:internal/streams/readable:1255:12)
    at processTicksAndRejections (node:internal/process/task_queues:82:21)

System and Environment

  • Hexo, OS, and node version
hexo: 7.0.0
hexo-cli: 4.3.1
os: linux 6.6.7-arch1-1 Arch Linux
node: 21.4.0
  • Site configuration file _config.yml N/A
  • Theme configuration file _config.icarus.yml or themes/icarus/_config.yml N/A (default)
  • Any additional theme configuration files (post front-matter, _config.post.yml, or _config.page.yml) N/A
  • Browser and version (e.g., Firefox 70.0, Chrome Android 80.0) N/A

To Reproduce

  1. cd into empty folder
  2. hexo init
  3. npm install -S hexo-theme-icarus hexo-renderer-inferno
  4. hexo config theme icarus
  5. Copy whatever YAML files in the source folder, e.g., cp _config.landscape.yml source/landscape.yml
  6. hexo g && hexo s

Note: With this minimal reproduction steps, I have a different error:

FATAL Something's wrong. Maybe you can find the solution here: https://hexo.io/docs/troubleshooting.html
TypeError: Cannot read properties of undefined (reading 'toString')
    at toString (/tmp/toto/node_modules/hexo/lib/hexo/render.ts:22:21)
    at /tmp/toto/node_modules/hexo/lib/hexo/render.ts:87:16
    at tryCatcher (/tmp/toto/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/tmp/toto/node_modules/bluebird/js/release/promise.js:547:31)
    at Promise._settlePromise (/tmp/toto/node_modules/bluebird/js/release/promise.js:604:18)
    at Promise._settlePromise0 (/tmp/toto/node_modules/bluebird/js/release/promise.js:649:10)
    at Promise._settlePromises (/tmp/toto/node_modules/bluebird/js/release/promise.js:729:18)
    at _drainQueueStep (/tmp/toto/node_modules/bluebird/js/release/async.js:93:12)
    at _drainQueue (/tmp/toto/node_modules/bluebird/js/release/async.js:86:9)
    at Async._drainQueues (/tmp/toto/node_modules/bluebird/js/release/async.js:102:5)
    at Immediate.Async.drainQueues [as _onImmediate] (/tmp/toto/node_modules/bluebird/js/release/async.js:15:14)
    at processImmediate (node:internal/timers:478:21)

Note2: Copying noraj.yml instead generates no error and YAML files are converted to JSON instead.

Expected behavior

YAML files would be ignored by hexo-renderer-inferno.

Screenshots

N/A

Additional context

package.json
{
  "name": "hexo-site",
  "version": "0.0.0",
  "private": true,
  "hexo": {
    "version": "7.0.0"
  },
  "dependencies": {
    "hexo": "7.0.0",
    "hexo-generator-archive": "2.0.0",
    "hexo-generator-category": "2.0.0",
    "hexo-generator-feed": "3.0.0",
    "hexo-generator-index": "3.0.0",
    "hexo-generator-json-content": "4.2.3",
    "hexo-generator-tag": "2.0.0",
    "hexo-i18n": "2.0.0",
    "hexo-multiauthor": "0.0.1",
    "hexo-pagination": "3.0.0",
    "hexo-renderer-ejs": "2.0.0",
    "hexo-renderer-inferno": "^0.1.3",
    "hexo-renderer-markdown-it": "7.1.0",
    "hexo-renderer-stylus": "3.0.0",
    "hexo-server": "3.0.0",
    "hexo-spoiler": "1.7.3",
    "hexo-tag-asciinema": "0.0.3",
    "hexo-tag-chart": "^1.0.8",
    "hexo-tag-embed": "^1.0.0",
    "hexo-theme-icarus": "^5.2.1"
  }
}
@ppoffice
Copy link
Owner

Did you put it under your-blog/source/_authors or your-blog/themes/icarus/source/_authors?

@ppoffice ppoffice added discussion Any questions about this theme. wontfix Something that will not be done or fixed. labels Dec 21, 2023
@stale stale bot removed the wontfix Something that will not be done or fixed. label Dec 21, 2023
@noraj
Copy link
Contributor Author

noraj commented Dec 21, 2023

Under your-blog/source/_authors

Copy link

stale bot commented Mar 17, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix Something that will not be done or fixed. label Mar 17, 2024
@noraj
Copy link
Contributor Author

noraj commented Mar 18, 2024

stale bots...

@stale stale bot removed the wontfix Something that will not be done or fixed. label Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Any questions about this theme.
Projects
None yet
Development

No branches or pull requests

2 participants