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

175
Vistas
importing npm packages into electron

I know there are a lot of questions like this but i cannot find a good answer that explains this issue so i know to work around it in the future. Im trying to import codemirror into my electron app and both import statements and the require functions do not work.

import { EditorView, basicSetup } from "codemirror"
const { EditorView, basicSetup } = require("codemirror")

When I use the import statement I get an error that says

Uncaught TypeError: Failed to resolve module specifier "codemirror". Relative references must start with either "/", "./", or "../".

And then when I use require I get an error saying

Uncaught ReferenceError: require is not defined

All I would like is an explanation of why this is happening and ways to get around it. Thankyou.

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