Installing Google Cloud Client Libraries for Node.js

The Google Cloud Client Library for Node.js is the idiomatic way for Node.js developers to integrate apps with other GCP services.

For example, you can install the corresponding Node.js Client Library for Cloud Datastore or Cloud Storage to integrate those services with your app.

For a complete list of all of the Node.js libraries for the supported GCP services, see that Node.js APIs & Libraries reference.

Example

Assume that you want to use Cloud Storage.

To install the Node.js client library for Cloud Storage:

  1. Install the client library locally by using a package manager:

    • To use npm, run:

      npm install --save @google-cloud/storage

    • To use yarn, run:

      yarn add @google-cloud/storage

  2. Set up authentication. You can configure the Google Cloud Node.js libraries to handle authentication automatically or you can provide credentials manually.

  3. Use the Node.js client library for Cloud Storage reference to implement support for the Cloud Storage service in your app.

Was this page helpful? Let us know how we did:

Send feedback about...

App Engine standard environment for Node.js docs