Error when starting application
Closed this issue · 3 comments
It starts the browser and then says this on the web page:
Failed to compile.
./src/ContentGeneration.js 212:54
Module parse failed: Unexpected token (212:54)
You may need an appropriate loader to handle this file type.
| type: "text",
| name: "content",
value: bookData.content[bookData.selectedChapter]?.[bookData.selectedSection]?.[bookData.selectedItem]?.[bookData.selectedPart] ?? 'Select part',
| __self: _this,
| __source: {
Hmm.. Let me have a look at it
Did you create a .env file with the API key (I don't think it's the problem in this case)
Is there anything else in the console when you run "npm start" ?
This seems caused by the fact that your node version doesn't support either of the nullish coalescing operator (??) or the optional chaining operator (?.) I will check babel configuration but can you try on a newer Node version, if possible ?
This should be fixed now in the latest commit. Those newer operators are not used anymore in the code
Thanks that worked. However there is another error that occurs. Just made a new post about it.