emilamaj / bookwriter Goto Github PK
View Code? Open in Web Editor NEWLet AI generate a complete book simply by providing a title and a description
Let AI generate a complete book simply by providing a title and a description
Issue when I press to generate an ouline:
Unhandled Rejection (TypeError): Cannot read properties of undefined (reading 'split')
_callee$
C:/Users/Julian/Documents/GitHub/bookwriter/src/App.js:60
57 | });
58 | let result = await resultPromise;
59 | // Remove all the lines before and including "# Outline"
60 | result = result.split("# Outline")[1];
| ^ 61 | console.log("Raw outline: ", result)
62 | setBook({
63 | ...book,
View compiled
tryCatch
C:/Users/Julian/Documents/GitHub/bookwriter/src/App.js:2
1 | // This is the main component of the app. It handles the state of the app and renders the appropriate view based on the currentView state.
2 |
3 | import React, { useState } from 'react';
4 | import DescriptionView from './Description';
5 | import OutlineView from './Outline';
View compiled
Generator.
C:/Users/Julian/Documents/GitHub/bookwriter/src/App.js:2
1 | // This is the main component of the app. It handles the state of the app and renders the appropriate view based on the currentView state.
2 |
3 | import React, { useState } from 'react';
4 | import DescriptionView from './Description';
5 | import OutlineView from './Outline';
View compiled
Generator.next
C:/Users/Julian/Documents/GitHub/bookwriter/src/App.js:2
1 | // This is the main component of the app. It handles the state of the app and renders the appropriate view based on the currentView state.
2 |
3 | import React, { useState } from 'react';
4 | import DescriptionView from './Description';
5 | import OutlineView from './Outline';
View compiled
▶ 2 stack frames were collapsed.
This screen is visible only in development. It will not appear if the app crashes in production.
Open your browser’s developer console to further inspect this error.
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: {
我想知道如何使用这个app,怎么安装它呢
Hello. I clicked "Generate" on the outline page. It says "generating" and then nothing ever comes up. I looked at the console and I got this:
[email protected] start
react-scripts start
Browserslist: caniuse-lite is outdated. Please run:
npx update-browserslist-db@latest
Why you should do it regularly: https://github.com/browserslist/update-db#readme
(node:1696) [DEP_WEBPACK_DEV_SERVER_ON_AFTER_SETUP_MIDDLEWARE] DeprecationWarning: 'onAfterSetupMiddleware' option is deprecated. Please use the 'setupMiddlewares' option.
(Use node --trace-deprecation ...
to show where the warning was created)
(node:1696) [DEP_WEBPACK_DEV_SERVER_ON_BEFORE_SETUP_MIDDLEWARE] DeprecationWarning: 'onBeforeSetupMiddleware' option is deprecated. Please use the 'setupMiddlewares' option.
Starting the development server...
Compiled with warnings.
Warning
(51:5) autoprefixer: end value has mixed support, consider using flex-end instead
Search for the keywords to learn more about each warning.
To ignore, add // eslint-disable-next-line to the line before.
WARNING in ./src/Description.css (./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[5].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[5].use[2]!./node_modules/source-map-loader/dist/cjs.js!./src/Description.css)
Module Warning (from ./node_modules/postcss-loader/dist/cjs.js):
Warning
(51:5) autoprefixer: end value has mixed support, consider using flex-end instead
webpack compiled with 1 warning
Warning (51:5) autoprefixer: end value has mixed support, consider using flex-end instead [eslint] src\Utils.js Line 115:1: Assign object to a variable before exporting as module default import/no-anonymous-default-export Search for the keywords to learn more about each warning. To ignore, add // eslint-disable-next-line to the line before. WARNING in ./src/Description.css (./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[5].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[5].use[2]!./node_modules/source-map-loader/dist/cjs.js!./src/Description.css) Module Warning (from ./node_modules/postcss-loader/dist/cjs.js): Warning (51:5) autoprefixer: end value has mixed support, consider using flex-end instead WARNING in [eslint] src\Utils.js Line 115:1: Assign object to a variable before exporting as module default import/no-anonymous-default-export webpack compiled with 2 warnings eprecated. Please use the 'setupMiddlewares' option. (Use node --trace-deprecation ...
to show where the warning was created) (node:11356) [DEP_WEBPACK_DEV_SERVER_ON_BEFORE_SETUP_MIDDLEWARE] DeprecationWarning: 'onBeforeSetupMiddleware' option is deprecated. Please use the 'setupMiddlewares' option.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.