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

169
Vistas
How do I create npm module for local files on my PC?

In my javascript code I am accessing .json file from the same local folder.

const data = require('../JS/countries.json');

When I published it on a GitHub I realized that no one, except for me can't run the program. The error says:

 code: 'MODULE_NOT_FOUND',
 requireStack: [ '/home/me/progs/testGit/technical-question/main.js' ]

From the internet I understood that I need to create a node module for passing this .json file.

Can anyone help me? I was reading articles on that topic, but I don't think I understood much.

about 4 years ago · Juan Pablo Isaza
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