The @google-cloud/storage package has a single named export which is the Storage (ES6) class, which should be instantiated with new.

See Storage and ClientConfig for client methods and configuration options.

Install the client library with <a href="https://www.npmjs.com/">npm</a>:
npm install --save @google-cloud/storage
Import the client library
const {Storage} = require('@google-cloud/storage');
Create a client that uses <a
Default Credentials (ADC)</a>:
const storage = new Storage();
Create a client with <a
const storage = new Storage({ projectId:
'your-project-id', keyFilename: '/path/to/keyfile.json'

Full quickstart example:

  // Imports the Google Cloud client library
  const {Storage} = require('@google-cloud/storage');

  // For more information on ways to initialize Storage, please see
  // https://googleapis.dev/nodejs/storage/latest/Storage.html

  // Creates a client using Application Default Credentials
  const storage = new Storage();

  // Creates a client from a Google service account key
  // const storage = new Storage({keyFilename: 'key.json'});

   * TODO(developer): Uncomment these variables before running the sample.
  // The ID of your GCS bucket
  // const bucketName = 'your-unique-bucket-name';

  async function createBucket() {
    // Creates the new bucket
    await storage.createBucket(bucketName);
    console.log(`Bucket ${bucketName} created.`);