GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — TypeError: Storage is not a constructor · Issue #731 · GoogleCloudPlatform/nodejs-docs-samples

TypeError: Storage is not a constructor #731

New issue
Copy link
New issue
Copy link
Closed
Closed
TypeError: Storage is not a constructor#731
Copy link

Description

@ChariseWalraven
ChariseWalraven
opened on Sep 6, 2018
Issue body actions

When following the tutorial here, I get a console error TypeError: Storage is not a constructor

When I replace the code with this, however

const storage = new Storage.Storage();

it works.

I am on MacOS, and am trying to set up cloud functions. My node version is 10.9.0.

If you need any more info, feel free to ask me and I'll send it 👍

Reacted by Connor Leech, Mauro Pineda, Xuriwork and Tim

Activity

  1. fhinkel commented on Oct 19, 2018

    @fhinkel
    fhinkel
    on Oct 19, 2018
    Contributor
    More actions

    Thanks for raising the issue. We updated the tutorial.

    const {Storage} = require('@google-cloud/storage');.

    Reacted by Sean Gilbertson and Curtis
  2. fhinkel
    closed this as completedon Oct 19, 2018
  3. kaygeeklaas commented on Nov 2, 2018

    @kaygeeklaas
    kaygeeklaas
    on Nov 2, 2018
    More actions

    I am on windows and i'm also getting the same error.

    firebase-tools :6.0.0
    google-cloud/storage: 2.2.0

    const functions = require('firebase-functions');
    const cors=require("cors")({origin:true})
    const fs=require("fs");
    const UUID=require("uuid");
    const {Storage}=require("@google-cloud/storage");
    
    const gcs = new Storage({
      projectId:"my-project-id",
      keyFileName:"project.json"
    })
    
    

    i tried to this const gcs=new Storage() but still gives me the Storage is not a constructor error

    Reacted by royaljain, Connor Leech, Gautham Ramesh Babu, Xuriwork and Francis Pelland
  4. grayside
    added a commit that references this issue on Nov 11, 2022

    chore: release 4.1.2 (#734)

    9f4b600
  5. ace-n
    added 4 commits that reference this issue on Nov 12, 2022

    chore: release 4.1.2 (#734)

    8f2752f

    chore(main): release 3.3.0 (#731)

    4cb733f

    chore(main): release 3.3.0 (#731)

    3e0c3af

    chore(main): release 3.3.0 (#731)

    3f8e9db
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.