mkitzmann / awwesome

Enhanced user interface for Awesome Selfhosted
https://awweso.me
BSD 3-Clause "New" or "Revised" License
245 stars 14 forks source link

Can't build full program #1

Closed mochman closed 10 months ago

mochman commented 10 months ago

When trying to run npm run build to build the full program, I always get this error:

93.91 fetched 36 repositories from Github in 5629.644306004047ms
93.96 Error: "Forbidden"
93.96     at fetchRepoInfoFromGithub (file:///app/.svelte-kit/output/server/entries/pages/_...category_/_page.server.ts.js:228:11)
93.96     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
93.96     at async load (file:///app/.svelte-kit/output/server/entries/pages/_...category_/_page.server.ts.js:254:22)
93.96     at async load_server_data (file:///app/.svelte-kit/output/server/index.js:646:18)
93.96     at async file:///app/.svelte-kit/output/server/index.js:2009:18
93.96 Error: "Forbidden"
93.96     at fetchRepoInfoFromGithub (file:///app/.svelte-kit/output/server/entries/pages/_...category_/_page.server.ts.js:228:11)
93.96     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
93.96     at async load (file:///app/.svelte-kit/output/server/entries/pages/_...category_/_page.server.ts.js:254:22)
93.96     at async load_server_data (file:///app/.svelte-kit/output/server/index.js:646:18)
93.96     at async file:///app/.svelte-kit/output/server/index.js:2009:18
94.01 creating load function, category:  analytics
94.02
94.02 node:internal/event_target:1054
94.02   process.nextTick(() => { throw err; });
94.02                            ^
94.03 Error: 500 /
94.03 To suppress or handle this error, implement `handleHttpError` in https://kit.svelte.dev/docs/configuration#prerender
94.03     at file:///app/node_modules/@sveltejs/kit/src/core/config/options.js:212:13
94.03     at file:///app/node_modules/@sveltejs/kit/src/core/postbuild/prerender.js:64:25
94.03     at save (file:///app/node_modules/@sveltejs/kit/src/core/postbuild/prerender.js:403:4)
94.03     at visit (file:///app/node_modules/@sveltejs/kit/src/core/postbuild/prerender.js:236:3)
94.03 Emitted 'error' event on Worker instance at:
94.03     at [kOnErrorMessage] (node:internal/worker:326:10)
94.03     at [kOnMessage] (node:internal/worker:337:37)
94.03     at MessagePort.<anonymous> (node:internal/worker:232:57)
94.03     at [nodejs.internal.kHybridDispatch] (node:internal/event_target:778:20)
94.03     at exports.emitMessage (node:internal/per_context/messageport:23:28)
94.03
94.03 Node.js v20.5.1

It doesn't always happen at the same point, but eventually this error pops up.

mkitzmann commented 10 months ago

Did you add the Github Token as outlined here: https://github.com/mkitzmann/awwesome#personal-access-token

mochman commented 10 months ago

Yes. I initially tried with a legacy token with only repo access then tried a legacy token with all access, then a new token. All did this.

Is there a specific style of token or scope I need?

mkitzmann commented 10 months ago

I used a fine grained personal access token without any rights. Because they have read acess to public repos per default.

https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#fine-grained-personal-access-tokens

If this doesnt work I would try to send a POST request (eg using postman) to the github graphql endpoint with a sample query using your token. This would show if there is a problem with the token or its related to the app.

mochman commented 10 months ago

My token did work with the API. I pulled your latest changes and now it all works. Closing.