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

218
Vistas
Electron not starting properly due to SIGTRAP

I am getting into Electron to try to begin building desktop applications. I am running into this error:

/home/me/dev/my-electron-app-2/node_modules/electron/dist/electron exited with signal SIGTRAP

This path leads to a binary file, so I can't really read what is happening. This error comes when I run:

npm start

My goal is to have a window appear on my desktop reflecting the HTML page. So far, the app is just:

index.html

<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
    <meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'">
    <meta http-equiv="X-Content-Security-Policy" content="default-src 'self'; script-src 'self'">
    <title>Hello World!</title>
  </head>
  <body>
    <h1>Hello World!</h1>
    We are using Node.js <span id="node-version"></span>,
    Chromium <span id="chrome-version"></span>,
    and Electron <span id="electron-version"></span>.
  </body>
</html>

main.js

const { app, BrowserWindow } = require('electron')

const createWindow = () => {
    const win = new BrowserWindow({
      width: 800,
      height: 600
    })
  
    win.loadFile('index.html')
}

app.whenReady().then(() => {
    createWindow()
  })

This code has come from the docs, here: https://www.electronjs.org/docs/latest/tutorial/quick-start

I have googled quite a bit and have been unable to find a solution that sticks. I am using Ubuntu in WSL. If anyone has any advice it would be appreciated.

Thanks

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

0

Since electron is a GUI application, and you are using Ubuntu on WSL (I'm assuming WSL2?), you need to run an X server for Ubuntu have something to render the GUI on.

You can download and install VcXsrv from here: https://sourceforge.net/projects/vcxsrv/

How to configure it is explained in the top answer to this question: How to set up working X11 forwarding on WSL2

Your other option is to not use WSL; just run node, npm and electron directly on your Windows machine. Then, you will not need to install any separate X server; your app should just work.

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