Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

167
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!