bug:
Error [ERR_MODULE_NOT_FOUND]: Cannot find module 'C:\Users\Usuario\Documents\Programas\Js\Servidor Node_Js\ExpressEMongoDB\src\Routes\LivrosRoutes' imported from C:\Users\Usuario\Documents\Programas\Js\Servidor Node_Js\ExpressEMongoDB\src\Routes\index.js
at new NodeError (node:internal/errors:405:5)
at finalizeResolution (node:internal/modules/esm/resolve:324:11)
at moduleResolve (node:internal/modules/esm/resolve:943:10)
at defaultResolve (node:internal/modules/esm/resolve:1129:11)
at nextResolve (node:internal/modules/esm/loader:163:28)
at ESMLoader.resolve (node:internal/modules/esm/loader:835:30)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18)
at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:77:40)
at link (node:internal/modules/esm/module_job:76:36) {
code: 'ERR_MODULE_NOT_FOUND'
}`
**livrosRoutes:**
`import express from "express";
import LivroController from "../controller/livroController";
const routes = express.Router();
routes.get("/livros", LivroController.ListarLivros);
export default routes;`
**index.js onde esta dando o erro:**
`import express from 'express'
import livros from './LivrosRoutes';
const routes = (app) =>{
app.route("/").get((req, res) => res.status(200).send("Curso de Node.js"));
app.use(express.json(), livros);
}
export default routes;`
Porque estou importando livros de ./LivrosRoutes ao inves de importar de models não entendi isso?