import express from "express";
import dotenv from "dotenv";
import projectItems from "./public/assets/dataArrays/projectItems.js";
console.log(projectItems);
dotenv.config();
const port = process.env.PORT || 5000;
const app = express();

app.use(express.json());

app.get("/api/test", (_, res) => {
  res.json({ message: "Server connected to frontend" });
});

app.post("/api/login", (req, res) => {
  const { username, password } = req.body;
  if (username === "admin" && password === "1234") {
    res.status(200).json({ username: username, password: password });
  } else {
    res.status(401).json({ message: "invalid credentials" });
  }
});

app.get("/api/cards", (req, res) => {
  const searchTerm = req.body;
  const filteredCards = projectItems.filter((val) => {
    val.description.concat(val.title).toLocaleLowerCase() ===
      searchTerm.toLocaleLowerCase();
  });

  res.json(filteredCards);
});

app.listen(port, () => console.log(`Server is running on port ${port}`));


Вот мой сервер, я хочу в нём перебирать карточки и отправлять на клиент. 
import springBoot from "../images/spring-boot.svg";
import springFramework from "../images/spring-framework.svg";
import springData from "../images/spring-data.svg";
import springCloud from "../images/spring-cloud.svg";
import springDataFlow from "../images/spring-data-flow.svg";
import springSecurity from "../images/spring-security.svg";

const projectItems = [
  {
    title: "Spring Boot",
    description:
      "Takes an opinionated view of building Spring applications and gets you in and running as quickly as possible.",
    imgSrc: springBoot,
    link: "#",
  },
  {
    title: "Spring Framework",
    description:
      "Provides core support for dependency injection, transaction management, web apps, data access, messaging, and more.",
    imgSrc: springFramework,
    link: "#",
  },
  {
    title: "Spring Data",
    description:
      "Provides a consistent approach to data access - relational, non-relational, map-reduce, and beyond.",
    imgSrc: springData,
    link: "#",
  },
  {
    title: "Spring Cloud",
    description:
      "Provides a set of tools for common patterns in distributed systems. Useful for building and deploying microservices.",
    imgSrc: springCloud,
    link: "#",
  },
  {
    title: "Spring Cloud Data Flow",
    description:
      "Provides an orchestration service for composable data microservice applications on modern runtimes.",
    imgSrc: springDataFlow,
    link: "#",
  },
  {
    title: "Spring Security",
    description:
      "Takes an opinionated view of building Spring applications and gets you in and running as quickly as possible.",
    imgSrc: springSecurity,
    link: "#",
  },
];

export default projectItems;


Это файл с данными, что сервер, что файл с данными лежат в папке с инициализированным реакт проектом. Когда я через f5 запускаю сервер, возникает следующая ошибка:

node:internal/modules/esm/resolve:854
  throw new ERR_MODULE_NOT_FOUND(packageName, fileURLToPath(base), null);
        ^

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'express' imported from d:\Work\Sunmait\Study\Stage4-5\reactSpringCopy\reactSpringCopy\server.js
    at packageResolve (node:internal/modules/esm/resolve:854:9)
    at moduleResolve (node:internal/modules/esm/resolve:927:18)
    at defaultResolve (node:internal/modules/esm/resolve:1169:11)
    at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:383:12)
    at ModuleLoader.resolve (node:internal/modules/esm/loader:352:25)
    at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:227:38)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:87:39)
    at link (node:internal/modules/esm/module_job:86:36) {
  code: 'ERR_MODULE_NOT_FOUND'
}

Node.js v20.16.0