title: Failed to resolve module specifier “express”. I am getting this error in my browser
body: <p><strong>I have imported express in my code but it gives me this error.emphasized text</strong></p>
  <hr />
  <p>Uncaught TypeError: Failed to resolve module specifier &quot;express&quot;. Relative references must start with either &quot;/&quot;, &quot;./&quot;, or &quot;../&quot;.</p>
  <hr />
  <p>Can somebody help me with this. Thanks.</p>
  <p><em>this my code in file app.js</em></p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>const express = require("express");
  const app = express();
  const path = require("path");
  // import the routres
  // The pages
  // Used client
  
  const homeRouter = require("./src/routes/home.route");
  
  // The pages
  // Used admin
  
  const dachRouter = require("./admin/routes/dach.route");
  const productsRouter = require("./admin/routes/products.route");
  const categoriesRouter = require("./admin/routes/categories.route");
  
  app.use(express.json())
  
  app.set("view engine", "ejs");
  
  app.set("views", [
    path.join(__dirname, "./src/views"),
    path.join(__dirname, "./admin/views"),
  ]);
  
  app.use(express.static(path.join(__dirname, "./src/assets")));
  
  app.use(express.static(path.join(__dirname,"./admin/assets")));
  
  
  app.use(express.static("./upload/admin"));
  
  // client
  app.all("/", homeRouter);
  
  // admin
  app.all("/admin", dachRouter);
  app.all("/admin/products", productsRouter);
  app.all("/admin/categories", categoriesRouter);
  app.use((req,res)=&gt;{
    res.send("and file send fhfhf fhf fh f f")
  })
  app.listen("3030", (err, res) =&gt; {
    if (err) throw err;
    console.log("run");
  });</code></pre>
  </div>
  </div>
  </p>