Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

480
Vistas
Trying Repo Github repository, but error showing Error: ENOENT: no such file or directory

https://github.com/Akshitaag/ACM-WH I repo this in vs code and tried running it as shown The project started on server but showing error while trying to use register Error: ENOENT: no such file or directory, stat '/Users/rajivjain/Desktop/ACM-WH/C:/Users/hp/ACM-WH/public/register.html'

Help me solve this

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Found the issue. If you check the "routes" directory, then take a look at where the register route is taking you, its file path is linked as this:

router.get("/register",function(req,res){
    //res.sendFile("/home/rahmeen/Desktop/ACM-WH/public/register.html");
    res.sendFile("C:/Users/hp/ACM-WH/public/register.html");
});

The issue with this is that it's linking to the route the file is in starting with the developer's C drive.

It seems like the developers have not yet discovered the proper usage of the path module, which is a module baked into Node; however, they are using it within the server.js.

Try replacing that entire route code referenced above with this:

const path = require('path');

router.get("/register",function(req,res){
    res.sendFile(path.join(__dirname + '/register.html'));
});

I'd also recommend cleaning up the file structure of this repo.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda