Error during download (deployment zip)

I have provided the base-point code above. You can always tailor it to suit your needs. For example, try logging the errors in your console to get a better idea on what the error is instead of the generic message that I’m currently showing.

I simply logged console.log(fileList.length) after await fetchFileList(). But you can also check that in the Netlify API documentation response (file_count) property.

The access token generated from here: Get started with the Netlify API | Netlify Docs should be used as:

authorization: `Bearer <access_token>`

Replace the value after Bearer

1 Like

Thanks, it was how I replaced the token. It’s now working

It’s downloading but these files are not mine. How should the package.json look for javascript? Mine is shown below:
{
“name”: “cesium-recover”,
“version”: “1.0.0”,
“description”: “”,
“main”: “index.js”,
“scripts”: {
“test”: “echo "Error: no test specified" && exit 1”
},
“type”: “module”,
“author”: “”,
“license”: “ISC”,
“dependencies”: {
“axios”: “^1.5.0”,
“netlify”: “^13.1.10”,
“nodejs-file-downloader”: “^4.12.1”
}
}

If you’re using my script, you just need axios as a dependency. So:

{
  "dependencies": {
    "axios": "1.5.0"
  },
  "type": "module"
}

should do it. If you’re writing a script yourself, feel free to do it your way.

1 Like

Thank you, I got all the files.

Will this download the pages generated during build using ssg?

This will only download all the files that exist in your publish folder. The deploy logs indicate which folder is being published (like publishing files from dist). If your file exists in that folder, it will be available for download.

Hello could you please do the same for me the whole website if you can I accidentally deleted the folder from my computer and its important. Thanksa

Site ID: 3bc257d5-d4a0-47e5-819c-3fa5ebc278ca

I’ve shared the deploy with the email associated with the site.