-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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 'text' of undefined #135
Comments
Can you give me the content of your SUMMARY.md please |
|
Can you try removing the line between the two lists and let me know if that works? @AaronO do you have any idea why this error is happing? |
The empty line was the problem indeed. However, issue closed and a huge thanks! =) |
The empty line was creating two list in the summary and not just one, it should not raised an error but just ignore the second list. @AaronO wrote this code, so I'll just let him take a look at this. |
It turns out this is the most common issue while building book, please help fix it ASAP. |
Did you look at the solution below ? |
I ran into this as well. Was kinda surprised it was just a formatting issue. Some warning would be nice. This is an error that many folks who are wanting to try gitbook will bump into literally on their first execution of the gitbook command. Thanks for the work on gitbook btw! |
This one just bit me as well. Couldn't figure out why the new book wasn't building. This is my third gitbook, and I wanted to try a deeper content structure ... |
* fix tab multiline * OpenAPI improvements (GitbookIO#127) * Fix display of authentication infos * Fix property names * Fix body / request starting with oneOf * CSS fixes * Show description * Format * Fix code samples * Convert swagger 2.0 to OpenAPI v3 (GitbookIO#128) * Convert swagger 2.0 to OpenAPI 3 * Format * Fix page with one api block shown as empty (GitbookIO#129) * Fix page with one api block shown as empty * Format * Style sprint (GitbookIO#126) * V1 code blocks fix * equalize modal text label + fix safari bug with fixed position stroke * code block adjustments * fix search result spacing * remove metal + adjust light and dark mode * remove metal from tw config * Add colordebugger + remove unused global colors * correct opacities on all colors * first part of cleaning up colors * fix tab colors * search modal color changes * adjust global colors * expandable + code color changes * add delay to loading panes * adjust globals * improve select table type * improve light mode checkbox * fix delay * content * uncomment debug * expandable fixes * OpenAPI improvements (GitbookIO#127) * Fix display of authentication infos * Fix property names * Fix body / request starting with oneOf * CSS fixes * Show description * Format * Fix code samples * Fix empty API responses not being displayed (GitbookIO#130) * Fix response not being displayed when contains no body * Fix padding * Resolve any JSON/YAML OpenAPI file and resolve common parameters (GitbookIO#132) * Fix parsing of OpenAPI when content-type is unknown * Resolve common parameters * Format * Add support for straight corners (GitbookIO#131) * Add class to body and tailwind variant * Use it on the search button * Use it for buttons and cookies banner * Use it for cards * Use it in more places * Lint * More * page feedback * theme toggler * Rename Authentication to Authorization (GitbookIO#133) * remove unused color light-5 * fix dupe css --------- Co-authored-by: Samy Pessé <samypesse@gmail.com>
I have no idea what to make out of this error message.
I have installed Gitbook a few weeks ago and have recently started to create a book. Now, all out of a sudden, it refrains from doing the
gitbook serve
task by telling me "TypeError: Cannot read property 'text' of undefined".I just did the
npm install gitbook -g
command again to get the current version of Gitbook. Now, when doing thegitbook serve
task the following output is given:Starting build ...
TypeError: Cannot read property 'text' of undefined
at parseChapter (/usr/local/lib/node_modules/gitbook/lib/parse/summary.js:94:46)
at Function.map (/usr/local/lib/node_modules/gitbook/node_modules/lodash/dist/lodash.js:3508:27)
at lodash.ctor.(anonymous function) as map
at Object.parseSummary as summary
at /usr/local/lib/node_modules/gitbook/lib/generate/index.js:125:45
at _fulfilled (/usr/local/lib/node_modules/gitbook/node_modules/q/q.js:787:54)
at self.promiseDispatch.done (/usr/local/lib/node_modules/gitbook/node_modules/q/q.js:816:30)
at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/gitbook/node_modules/q/q.js:749:13)
at /usr/local/lib/node_modules/gitbook/node_modules/q/q.js:557:44
at flush (/usr/local/lib/node_modules/gitbook/node_modules/q/q.js:108:17)
The text was updated successfully, but these errors were encountered: