Skip to content
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

Error compiling npm run build. #5

Open
VeLuisS opened this issue Mar 9, 2023 · 4 comments
Open

Error compiling npm run build. #5

VeLuisS opened this issue Mar 9, 2023 · 4 comments

Comments

@VeLuisS
Copy link

VeLuisS commented Mar 9, 2023

Error compiling npm run build.
Help, I leave below the result of the terminal.

`
[ ==] info - Generating static pages (9/11)
Error occurred prerendering page "/". Read more: https://nextjs.org/docs/messages/prerender-error
TypeError: Cannot destructure property 'comics' of 'resultAll' as it is null.
at getStaticProps (/.next/server/pages/index.js:1183:21)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async renderToHTML (/node_modules/next/dist/server/render.js:386:20)
at async /node_modules/next/dist/export/worker.js:304:36
at async Span.traceAsyncFn (/node_modules/next/dist/trace/trace.js:79:20)
info - Generating static pages (11/11)

Build error occurred
Error: Export encountered errors on following paths:
/
at /node_modules/next/dist/export/index.js:404:19
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Span.traceAsyncFn (/node_modules/next/dist/trace/trace.js:79:20)
at async /node_modules/next/dist/build/index.js:1229:21
at async Span.traceAsyncFn (/node_modules/next/dist/trace/trace.js:79:20)
at async /node_modules/next/dist/build/index.js:1091:17
at async Span.traceAsyncFn (/node_modules/next/dist/trace/trace.js:79:20)
at async Object.build [as default] (/node_modules/next/dist/build/index.js:65:29)
`

@leephan2k1
Copy link
Owner

You need setup this database to connect to the project, if you did, skip it

Maybe you need to add a collection "real_time_comics" to MongoDB with data: json data .

if you need to work it's ok. Since this data will be outdated (Because this collection generate by cron-job server from the repo: kyt-server.) so I do not add it to the sample data. But I think there is an error so I will add this collection to the sample database in the future :b

@VeLuisS
Copy link
Author

VeLuisS commented Mar 11, 2023

Hi, thanks a lot for the timely response, I'll try to add a table to the MongoDB database and try to compile again.

@VeLuisS
Copy link
Author

VeLuisS commented Mar 13, 2023

Sorry for the question, but does this code have no Backend?

PD: The additional Json to the database provided, if I fix the problem. I managed to install successfully. Test and be delighted. Thanks for this project.

@leephan2k1
Copy link
Owner

Not really, this repo has no backend (It includes in /src/serverless and NextJS's API routes.).
But the server code doesn't do many tasks.

I have a separate backend to handle cron-job data updates and the Socket server.

Finally, I'd like to thank you for your interest in my project

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants