Erorr when compiling my app

For some reason when i try to build my app it shows app inventor is unable to compile this project the compiler error output is.
then this code

{"$components":[{"$Name":"Chapter_1","$Type":"Form","$Version":"27","ActionBar":"True","AppName":"Edwin_Yugo","CloseScreenAnimation":"fade","OpenScreenAnimation":"zoom","Scrollable":"True","ShowListsAsJson":"False","Theme":"AppTheme.Light.DarkActionBar","Title":"Chapter_1","Uuid":"0","$Components":[{"$Name":"Label1","$Type":"Label","$Version":"5","FontBold":"True","HasMargins":"False","Width":"-1100","Text":"History and the future:","Uuid":"810113576"},{"$Name":"Label2","$Type":"Label","$Version":"5","Height":"-1005","Width":"-1098","Text":"My name is Eiden Yugo. My thirteenth birthday was about a month ago. I celebrated it with my mother with whom I live alone. ","Uuid":"-662070104"},{"$Name":"Label3","$Type":"Label","$Version":"5","HasMargins":"False","Text":"I never met my father. He was killed in action when I was still few months old.\n","Uuid":"-1712437467"},{"$Name":"Label4","$Type":"Label","$Version":"5","Height":"42","Width":"-1100","Text":"\nI’ve always wanted to become a soldier to be able to protect the kingdom. \n \nAlso soldiers make a lot of money so my mom won’t have to work at the Local stew restaurant anymore. \n\n","Uuid":"-2051118503"},{"$Name":"Label5","$Type":"Label","$Version":"5","Height":"28","Width":"-1100","Text":"But that isn’t my choice. According to the laws, each clan is supposed to choose only the candidates with the most potential to join the academy. \n\n","Uuid":"341479639"},{"$Name":"Label6","$Type":"Label","$Version":"5","Height":"45","Width":"-1100","Text":"That law was made to minimize casualties in any battle which makes sense. \n\nHaving a small army of the strongest people is better than an army of many weak ones who would just increase losses. \n\n","Uuid":"1871450652"},{"$Name":"Label7","$Type":"Label","$Version":"5","Height":"75","Width":"-1098","Text":"It’s been over a hundred and fifty years since the Great War ended, and today only two Kingdoms exist. \n\nThe southern Kingdom also known as Haibing Kingdom where I live. And the northern kingdom which I don’t know much about. My mother bought me a book called ‘’ History and the future’’ \n\nI started reading the first chapters but they weren’t informative hopefully the next chapter will help me know more about the continent. ","Uuid":"1359637508"},{"$Name":"Label8","$Type":"Label","$Version":"5","Height":"45","Width":"-1098","Text":"\nYesterday a messenger from Master Shinishi’s mansion who is the leader of our clan, gave me an invitation to the clan test. And I am excited to participate. \nFew minutes later my mother opens the door and get in. \n","Uuid":"-2077522093"},{"$Name":"Label9","$Type":"Label","$Version":"5","Text":"\nMother: Hi Eiden, How was your day? \n","Uuid":"1911526338"},{"$Name":"Label10","$Type":"Label","$Version":"5","HasMargins":"False","Height":"30","Width":"-1098","Text":"\nEiden: it was boring a bit. Aside from training, buying groceries and telling Uncle Sam about the invitation didn’t really do much. \n","Uuid":"-767958535"},{"$Name":"Label11","$Type":"Label","$Version":"5","Text":"\nMother: Yeah right. let’s eat, I brought dinner from the restaurant. \n","Uuid":"-1844197811"},{"$Name":"Label12","$Type":"Label","$Version":"5","Height":"30","Width":"-1098","Text":"\nWe live in a small house in a village known as the Shu village. \n\nMy bedroom is on the second floor technically it is an attic, but I find it cozy. \n\n","Uuid":"421649568"},{"$Name":"Image1","$Type":"Image","$Version":"4","Height":"420","Width":"210","Picture":"home.jpg","Uuid":"-677644881"},{"$Name":"Label13","$Type":"Label","$Version":"5","Text":"We sat down on the table and started eating. ","Uuid":"-1162304950"},{"$Name":"Label14","$Type":"Label","$Version":"5","Height":"30","Width":"-1098","Text":"Mother: Eiden, I know you’re excited about the invitation but you can decline. I worry about you. ","Uuid":"622937569"},{"$Name":"Label15","$Type":"Label","$Version":"5","Width":"-1098","Text":"Eiden: Don’t worry mom it’s a different time than dad’s. \n\nIt’s a lot more peaceful now. ","Uuid":"1622170104"},{"$Name":"Label16","$Type":"Label","$Version":"5","Height":"30","Width":"-1098","Text":"Mother: that doesn’t calm me. The war between the kingdoms settled but to this day gangs and bandits still fight and cause deaths to soldiers every day. ","Uuid":"-1959859510"},{"$Name":"Label18","$Type":"Label","$Version":"5","Height":"30","Width":"-1098","Text":"Mother: that doesn’t calm me. The war between the kingdoms settled but to this day gangs and bandits still fight and cause deaths to soldiers every day. ","Uuid":"706820438"},{"$Name":"Label17","$Type":"Label","$Version":"5","Height":"30","Width":"-1098","Text":"Eiden: I don’t care. I have made my mind long time ago. \n\nNothing you say will change my mind. ","Uuid":"-1202162482"},{"$Name":"Label19","$Type":"Label","$Version":"5","Text":"Mother: Just be careful ok? \n\n ","Uuid":"-677340079"},{"$Name":"Label20","$Type":"Label","$Version":"5","Text":"Eiden: by the way how was my father when he passed the test? \n\n","Uuid":"476816995"},{"$Name":"Label21","$Type":"Label","$Version":"5","Text":"Mother: He….. Was good. He passed on the first try. \n\n","Uuid":"1843210232"},{"$Name":"Label22","$Type":"Label","$Version":"5","Height":"30","Width":"-1098","Text":"Eiden: I know that. How else would he have become a soldier?! I meant how did he do in the test? and how was the test? \n\n","Uuid":"-1050543249"},{"$Name":"Label23","$Type":"Label","$Version":"5","Height":"30","Width":"-1098","Text":"Mother: The clan test usually challenges your physical and mental abilities. \nStrength isn’t the only thing a good soldier should possess. \n","Uuid":"-1004966823"},{"$Name":"Label24","$Type":"Label","$Version":"5","Text":"\n\nEiden: So what did they do? \n\n","Uuid":"922640490"},{"$Name":"Label25","$Type":"Label","$Version":"5","Height":"30","Width":"-1098","Text":"Mother: You know it’s forbidden to talk about the test. \n\nThey also want to make sure that you will be ready for anything when the time comes. \n\n ","Uuid":"32972125"},{"$Name":"Label26","$Type":"Label","$Version":"5","Height":"15","Width":"-1098","Text":"Eiden: Yeah yeah. Thanks for the food I will go to bed, Got to wake up early. \n\n","Uuid":"283344151"},{"$Name":"Label27","$Type":"Label","$Version":"5","Text":"Mother: good night Eiden.","Uuid":"138565049"},{"$Name":"Label28","$Type":"Label","$Version":"5","Height":"80","Width":"-1098","Text":"I go to my bedroom but it took me like an hour to finally fall asleep. \n\nI woke up six hours later its five in the morning I can’t go back to sleep. \n\nThe invitation says I should be there at eight in the morning. \n\nAnd since we live on the outskirts of the capital at the Shu village it takes about an hour walking to get to the center of the capital. \n\nI will just go early this way I can avoid mom’s emotional reaction to me leaving. \n\nI will just write her a note. ","Uuid":"1800543651"},{"$Name":"Image2","$Type":"Image","$Version":"4","Height":"420","Width":"-1098","Picture":"paper-3653357.jpg","ScalePictureToFit":"True","Uuid":"1148983601"},{"$Name":"Label29","$Type":"Label","$Version":"5","Height":"30","Width":"-1098","Text":"And just as I walk out of the house I hear ‘’ Eiden’’. \n\nI look back and its mom standing by the door holding the note then she says ‘’Good luck’’ \n\nI nod and get on my way. ","Uuid":"1357436364"}]}],"$blocks":[]}

The app is suppose to be a book so i created several labels and added a paragraph in each
I have zero knowledge of java script so please keep that in mind if you want to help me.
Thanks in advance.

That's too many Labels.

Instead, save your chapters in Media files named
chapter1.html,
chapter2.html,
...
chapterN.html,
and use the SelectionIndex from a List Picker of Chapter Names to build the file name you want to load to a WebViewer or html label.

The idea is to reuse the WebViewer or html label.

2 Likes

Do you used any extension in your project?

Could you please explain how to call these chapters files in Lable?

when ListPcker AfterSelection
  read file File1 from JOIN(List Picker.Selection, ".html")
end

when File1 GotText(text)
  set Label1.Text to text
end
1 Like