HTTPError: Response code 500 (Internal Server Error)
DrigaNicolai opened this issue · 9 comments
It is working in my tests.
What are the vercel url are you using?
I tried two links, the first one is a commercial project, so I can't share it, the second one is my test project, I can share it if needed
@zehfernandes
I have tried installing a newer version of node js, but I still encounter this error. I get as the deployment url this value
am I right?
(test project deployment url from the screenshot: nextjs-locofy-real-estate-j207zulc0-driganicolai.vercel.app)
hmmm the URL is right.
I couldn't reproduce the error with my test projects.
Maybe if you have time we can add some console.logs (https://github.com/zehfernandes/get-vercel-source-code/blob/main/index.js#L63) to this function and paste here the outputs to help me understand more about the error and try to fix the issue.
I added a couple of console logs:
async function getDeploymentSource(id) {
console.log(id, "id");
let path = `/v6/deployments/${id}/files`;
console.log(path, "path");
if (VERCEL_TEAM) path += `?teamId=${VERCEL_TEAM}`;
const files = await getJSONFromAPI(path);
console.log(files, "files");
// Get only src directory
const source = files.find((x) => x.name === "src");
console.log(source, "source");
// Flatten tree structure to list of files/dirs for easier downloading
return flattenTree(source);
}
and this is the result:
Seems to be an issue in getFromAPI function
Same for me. Also tested with plain curl copied from vercel docs and it didn't work. So it seems to be a problem with their API and not this repo code.
im facing the same issue, please help @zehfernandes
This only works if deploying project from Vercel CLI