[PR #345] [CLOSED] Improved nodejs example #536

Closed
opened 2026-03-03 12:30:29 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/fsouza/fake-gcs-server/pull/345
Author: @jeantil
Created: 10/19/2020
Status: Closed

Base: mainHead: main


📝 Commits (1)

  • d938133 provides a more complete nodejs example

📊 Changes

3 files changed (+160 additions, -15 deletions)

View changed files

📝 examples/node/index.js (+97 -10)
📝 examples/node/package-lock.json (+60 -4)
📝 examples/node/package.json (+3 -1)

📄 Description

  • This example works as is using an identity associated to a valid billing account
  • This example works using a free firebase account (which provides a free bucket) but you need to comment the createBucket and bucket.delete() since free accounts are not allowed to create additional buckets
  • This example works against fake-gcs-server if you configure free firebase account credentials when creating the storage instance.

Note that the following fails :

  • without any credentials (as is suggested in the original example) file manipulation operations fail with :
Error: Could not load the default credentials. Browse to https://cloud.google.com/docs/authentication/getting-started for more information.
    at GoogleAuth.getApplicationDefaultAsync (/home/jean/dev/startups/yupwego/src/fake-gcs-server/examples/node/node_modules/google-auth-library/build/src/auth/googleauth.js:155:19)

this has been reported and closed before as being a client library error, I have reported it at https://github.com/googleapis/nodejs-storage/issues/1315


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/fsouza/fake-gcs-server/pull/345 **Author:** [@jeantil](https://github.com/jeantil) **Created:** 10/19/2020 **Status:** ❌ Closed **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (1) - [`d938133`](https://github.com/fsouza/fake-gcs-server/commit/d93813368f99d8c56289d2678a698add869f7907) provides a more complete nodejs example ### 📊 Changes **3 files changed** (+160 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `examples/node/index.js` (+97 -10) 📝 `examples/node/package-lock.json` (+60 -4) 📝 `examples/node/package.json` (+3 -1) </details> ### 📄 Description * This example works as is using an identity associated to a valid billing account * This example works using a free firebase account (which provides a free bucket) but you need to comment the `createBucket` and `bucket.delete()` since free accounts are not allowed to create additional buckets * This example works against fake-gcs-server if you configure free firebase account credentials when creating the storage instance. Note that the following fails : - without any credentials (as is suggested in the original example) file manipulation operations fail with : ``` Error: Could not load the default credentials. Browse to https://cloud.google.com/docs/authentication/getting-started for more information. at GoogleAuth.getApplicationDefaultAsync (/home/jean/dev/startups/yupwego/src/fake-gcs-server/examples/node/node_modules/google-auth-library/build/src/auth/googleauth.js:155:19) ``` this has been reported and closed before as being a client library error, I have reported it at https://github.com/googleapis/nodejs-storage/issues/1315 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 12:30:29 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/fake-gcs-server#536
No description provided.