This script fetches all of the files from the currently deployed version of a Firebase Hosting site. You must be signed in via the Firebase CLI and have "Site Viewer" permission on the site in question to be able to properly run the script.
npx https://gist.github.com/mbleigh/9c8680cf319ace2f506f57380da66e7d <site_name>
Where <site_name>
is your Firebase Hosting site (e.g. my-site
from my-site.firebaseapp.com
).
The files will be downloaded into a folder <site_name>_<version_id>
where the version ID is the
current version of your site.
Hi, I tried using this with one of my firebase apps, it resulted in the following error.
(node:7084) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency (Use
node --trace-warnings ...to show where the warning was created)
ERROR: FirebaseError: HTTP Error: 404, Requested entity was not found.
at module.exports (C:\Users\sreed\AppData\Roaming\npm-cache_npx\7084\node_modules\firebase-hosting-fetch-version\node_modules\firebase-tools\lib\responseToError.js:38:12)
at Request._callback (C:\Users\sreed\AppData\Roaming\npm-cache_npx\7084\node_modules\firebase-hosting-fetch-version\node_modules\firebase-tools\lib\api.js:40:35)
at Request.self.callback (C:\Users\sreed\AppData\Roaming\npm-cache_npx\7084\node_modules\firebase-hosting-fetch-version\node_modules\request\request.js:185:22)
at Request.emit (events.js:315:20)
at Request. (C:\Users\sreed\AppData\Roaming\npm-cache_npx\7084\node_modules\firebase-hosting-fetch-version\node_modules\request\request.js:1154:10)
at Request.emit (events.js:315:20)
at IncomingMessage. (C:\Users\sreed\AppData\Roaming\npm-cache_npx\7084\node_modules\firebase-hosting-fetch-version\node_modules\request\request.js:1076:12)
at Object.onceWrapper (events.js:421:28)
at IncomingMessage.emit (events.js:327:22)
at endReadableNT (internal/streams/readable.js:1327:12)
Please help me resolving this.
Thanks in advance