title: How to fix Api Error: Required parameter: project in GAE with GCS
body: <p>I am getting the following error when trying to connect with a Google Cloud Storage Bucket in a nodejs app based in the Google App Engine.</p>
  <blockquote>
  <p>ApiError: Required parameter: project</p>
  <pre><code>   at Util.parseHttpRespBody (/workspace/node_modules/@google-cloud/common/build/src/util.js:208:38)
  
     at Util.handleResp (/workspace/node_modules/@google-cloud/common/build/src/util.js:149:117)
  </code></pre>
  </blockquote>
  <p>The code to connect in the server.js file is pretty straightforward:</p>
  <pre><code>const {Storage} = require('@google-cloud/storage');
  const storage = new Storage();
  storage.getBuckets().then(y =&gt; console.log(y));
  </code></pre>
  <p>Both the deployed app and storage bucket are part of the same project.</p>
  <p>I have also created a service account for the storage bucket, which has API Keys Admin and Storage Admin roles, and API keys have been generated.</p>
  <p>Any help would be much appreciated!</p>
  <h1>Edit:</h1>
  <p>Here is the updated code (with my project id edited):</p>
  <pre><code>const {Storage} = require('@google-cloud/storage');
  
  const storage = new Storage({
    projectId: 'r@@@@@@t-t@@@h-3####9'
  });
  
  storage.getBuckets().then(y =&gt; console.log(y));
  </code></pre>
  <h2>package.json dependencies:</h2>
  <pre><code>&quot;dependencies&quot;: {
      &quot;@google-cloud/storage&quot;: &quot;^5.15.3&quot;,
      &quot;body-parser&quot;: &quot;^1.19.0&quot;,
      &quot;dotenv&quot;: &quot;^10.0.0&quot;,
      &quot;ejs&quot;: &quot;^3.1.6&quot;,
      &quot;express&quot;: &quot;^4.17.1&quot;,
      &quot;multer&quot;: &quot;^1.4.3&quot;,
      &quot;pg&quot;: &quot;^8.7.1&quot;,
      &quot;pg-hstore&quot;: &quot;^2.3.4&quot;,
      &quot;sequelize&quot;: &quot;^6.6.5&quot;,
      &quot;sequelize-cli&quot;: &quot;^6.2.0&quot;
    },
    &quot;devDependencies&quot;: {
      &quot;@types/node&quot;: &quot;^14.6.2&quot;,
      &quot;nodemon&quot;: &quot;^2.0.14&quot;
    }
  </code></pre>