title: How to resolve "Could not find a declaration file for module 'request-context'. "?
body: <p>I am working on three files at the moment which are index.js , index.main.js and app.js. I'm using request-context to grab a variable from index.main.js and pass it to index.js.</p>
  
  <p>In app.js (A file I created in my server folder) I have the following code</p>
  
  <pre><code>    //full code in app.js
  
      const contextService = require("request-context");
      const app = express();
  
      app.use(contextService.middleware("request"));
  </code></pre>
  
  <p>I have tried running these following commands</p>
  
  <pre><code>npm install --save typescript @types/node @types/react @types/react-dom @types/jest
  
  npm install -D @types/request-context
  </code></pre>
  
  <p>and also tried using before import</p>
  
  <pre><code>// @ts-ignore
  </code></pre>
  
  <p>To no avail.</p>
  
  <p>When I check my app.js I notice three dots on the word "require" which shows:</p>
  
  <p>Could not find a declaration file for module 'request-context'. '/home/servertest/Desktop/folder/folder1/src/component_NodeJS/server/node_modules/request-context/lib/index.js' implicitly has an 'any' type.
    Try <code>npm install @types/request-context</code> if it exists or add a new declaration (.d.ts) file containing <code>declare module 'request-context';</code>ts(7016)</p>
  
  <p>In index.main.js I have the following</p>
  
  <pre><code> async function listFilesInDepth()
  
      {
        const {Storage} = require('@google-cloud/storage');
  
        const storage = new Storage();
  
        const bucketName = 'probizmy';
  
        const [files] = await storage.bucket(bucketName).getFiles();
  
        const contextService = require("request-context");
  
        console.log('List Of Files Available:'); 
  
          files.forEach(file =&gt;
  
            {
  
              targetFiles = file.name;
  
              console.log(`-----`+file.name);
            });
  
            contextService.set("request:targetFileKey", targetFiles);
  
            return targetFiles;
      }
  </code></pre>
  
  <p>and in index.js I have the following code</p>
  
  <pre><code>const contextService = require("request-context");
  const targetFiles = contextService.get("request:targetFileKey");
  
  console.log(targetFiles) //output shows undefined
  </code></pre>
  
  <p>I'm suspecting the request-context error is why I'm getting undefined as the output. My expected result is for the value of targetFiles to be output on the console log.</p>
  
  <p>Hoping to get some insight on this. Any help would be greatly appreciated! Thank you :)</p>
  
  <p>Edited:</p>
  
  <p>As requested I have included package.json</p>
  
  <pre><code>{
    "name": "server",
    "version": "0.1.81",
    "description": "Server NodeJS For Internel Process",
    "main": "index.js",
    "scripts": {
      "test": "echo \"Error: no test specified\" &amp;&amp; exit 1"
    },
    "dependencies": {
      "@google-cloud/storage": "^2.4.2",
      "@google-cloud/vision": "^0.25.0",
      "@types/jest": "^24.0.15",
      "@types/node": "^12.0.12",
      "@types/react": "^16.8.23",
      "@types/react-dom": "^16.8.4",
      "alphabet-generator": "^1.0.1",
      "body-parser": "^1.18.3",
      "cheerio": "^1.0.0-rc.2",
      "cors": "^2.8.5",
      "express": "^4.16.4",
      "format": "^0.2.2",
      "grpc": "^1.19.0",
      "multer": "^1.4.1",
      "natural": "^0.6.3",
      "path": "^0.12.7",
      "request": "^2.88.0",
      "request-context": "^2.0.0",
      "require-all": "^3.0.0",
      "require-dir": "^1.2.0",
      "string-similarity": "^3.0.0",
      "typescript": "^3.5.2"
    },
    "devDependencies": {
      "babel-plugin-root-import": "^6.2.0"
    }
  }
  </code></pre>