Skip to content

sky-y/vivliostyle-issue-toc-error

Repository files navigation

Vivliostyle Issue: Error on TOC Generation by index.md

npx vivliostyle build --verbose goes infinity loop in this project when index.md is specified as TOC (<nav id="toc" role="doc-toc">).

toc: true is disabled here.

About this project

This project is originally generated by Create Book.

$ npm create book sample-book-kagakunofushigi
? description description
? author name アンリイ・ファブル(大杉栄、伊藤野枝訳)
? author email
? license CC0-1.0
? choose theme @vivliostyle/theme-techbook - Techbook (技術同人誌) theme

I renamed the generated directory to vivlistyle-issue-toc-error.

Files

index.md:

# 科学の不思議

<nav id="toc" role="doc-toc">

## 目次

- [一 六人](./01.md)

</nav>

vivliostyle.config.js:

module.exports = {
  title: '科学の不思議', 
  author: 'アンリイ・ファブル(大杉栄、伊藤野枝訳)', 
  size: 'JIS-B5', // paper size.
  theme: '@vivliostyle/theme-techbook', // .css or local dir or npm package. default to undefined.
  entry: [
    'index.md',
    '01.md',
  ], 
  // toc: true, // whether generate and include toc.html or not (does not affect manifest.json), default to `true`. if `string` given, use it as a custom toc.html.
}

How to Reproduce

  • Clone this project
$ npm install
$ npx vivliostyle build --verbose

Log

$ npx vivliostyle build --verbose
ℹ MathJax(?): Cannot read property 'MmlTree' of undefined
ℹ defaultSettings {"pageSizeOption":"preset","pageSizePresetSelect":"JIS-B5","pageSizeUseLandscape":false,"pageSizeWidth":"210mm","pageSizeHeight":"297mm","overrideDocumentStylesheets":true,"loadMode":"book"}
ℹ JSHandle@object
ℹ E_INVALID_PROPERTY -o-tab-size: 4
ℹ Property not supported by the browser:  behavior
ℹ Property not supported by the browser:  ua-list-item-count
✔ index.md 科学の不思議
ℹ E_INVALID_PROPERTY -o-tab-size: 4
✔ 01.md 一 六人
ℹ Error during action: toc 
 TypeError: Cannot read property '1' of null 
 TypeError: Cannot read property '1' of null
    at e4 (http://localhost:13001/broker/dist/bundle.js:14697:61)
    at Array.map (<anonymous>)
    at t4 (http://localhost:13001/broker/dist/bundle.js:14694:33)
    at t3.e3.getTOC (http://localhost:13001/broker/dist/bundle.js:14699:16)
    at t3.e3.getTOC (http://localhost:13001/broker/dist/bundle.js:16101:100)
    at Array.listener (__puppeteer_evaluation_script__:8:39)
    at t3.e3.dispatchEvent (http://localhost:13001/broker/dist/bundle.js:1051:19)
    at t3.e3.dispatcher (http://localhost:13001/broker/dist/bundle.js:16056:30)
    at t3.e3.callback (http://localhost:13001/broker/dist/bundle.js:15676:38)
    at t3.callback (http://localhost:13001/broker/dist/bundle.js:15962:16)
        ---- async ---
        runCommand
        loop
        Frame.loop
        commandLoop

About sample

青空文庫から転載・改変しました。

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages