You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 3, 2026. It is now read-only.
Thanks for stopping by to let us know something could be better!
PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.
Is this a client library issue or a product issue?
library issue
Did someone already solve this?
Not that I can find
Do you have a support contract?
No
Environment details
OS: macOS
Node.js version: 14 and 16
npm version: 6.14.16 and 8.5.5
@google-cloud/storage version: v5.20.1
Steps to reproduce
Install @google-cloud/storage and use it as a dependency in your project
Package your project with esbuild
See that it fails with the following errors:
✘ [ERROR] Could not resolve "../package.json"
node_modules/@google-cloud/storage/build/src/storage.js:384:34:
384 │ packageJson = require('../package.json');
╵ ~~~~~~~~~~~~~~~~~
✘ [ERROR] Could not resolve "../../package.json"
node_modules/@google-cloud/storage/build/src/nodejs-common/util.js:37:26:
37 │ packageJson = require('../../package.json');
╵ ~~~~~~~~~~~~~~~~~~~~
✘ [ERROR] Could not resolve "../package.json"
node_modules/@google-cloud/storage/build/src/gcs-resumable-upload.js:37:26:
37 │ packageJson = require('../package.json');
╵ ~~~~~~~~~~~~~~~~~
I am using firebase-admin which has @google-cloud/storage as a dependency. When I pin @google-cloud/storage to 5.19.4 I can package my app fine with esbuild. When it is updated to v5.20.1 it starts to fail with the above error.
Thanks for stopping by to let us know something could be better!
PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.
Is this a client library issue or a product issue?
library issue
Did someone already solve this?
Not that I can find
Do you have a support contract?
No
Environment details
@google-cloud/storageversion: v5.20.1Steps to reproduce
@google-cloud/storageand use it as a dependency in your projectI am using
firebase-adminwhich has@google-cloud/storageas a dependency. When I pin@google-cloud/storageto5.19.4I can package my app fine with esbuild. When it is updated tov5.20.1it starts to fail with the above error.