Trouble starting electron in WSL

Viewed 640

edit: running npm install --platform=win32 fixed the problem for me.

I'm pretty new to development in general but I'll try to word this best I can.

I'm currently working in Ubuntu 20.04 and am getting the following error when trying to start my electron app:

$ concurrently -k "cross-env BROWSER=none yarn start" "yarn electron:start"
$ wait-on tcp:3000 && electron .
$ react-scripts start
[1] [18975:0420/203748.456856:FATAL:setuid_sandbox_host.cc(158)] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /home/sam/dev-academy/financials-electron/node_modules/electron/dist/chrome-sandbox is owned by root and has mode 4755.
[1] /home/sam/dev-academy/financials-electron/node_modules/electron/dist/electron exited with signal SIGTRAP

I've tried running:

cd node_modules/electron/dist                                                                                                             255 ↵
sudo chown root:root chrome-sandbox
sudo chmod 4755 chrome-sandbox

But am then met with the following error after trying to start the app again:

Failed to move to new namespace: PID namespaces supported, Network namespace supported, but failed: errno = Permission denied
[1] /home/sam/dev-academy/financials-electron/node_modules/electron/dist/electron exited with signal SIGTRAP

I also tried sudo echo 'kernel.unprivileged_userns_clone=1' > /etc/sysctl.d/userns.conf but was met with permission denied.

0 Answers
Related