electron / electron-quick-start

Clone to try a simple Electron app

Home Page:https://electronjs.org/docs/latest/tutorial/quick-start

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NPM start not working on windows 10/ WSL2 running ubuntu 20.04.2

rlmorrison74 opened this issue · comments

I was trying to follow along with a udemy course for electron, and when I tried to run npm start, I was getting an error. So I did some digging, and eventually cloned the quick start repo to see if I'd have the same issue and I do. Here's a screenshot of my terminal when I run npm start. The same error appears when you run electron . and electron main.js.

Current npm version: 8.3.2
Current nvm version: 0.35.2
Current node.js version: 17.4.0

before this I had the same error using node version 15.13.0 as well, then I updated to see if it would help.
image

update: I've kept digging, and just ended up using apt-cache search on libatk, then sudo apt-get installing the latest version, then running npm start again, which would say there was a different file or directory that didn't exist. So I repeated the process until that no longer happened, and got a new error.

image

I also tried using yarn because some feedback on the web seemed to suggest that WSL2 w/ubuntu and electron don't play nice on npm, but no dice.

Here are some WSL2-specific instructions for running Electron (most of it isn't particularly tied to Electron Forge): https://www.electronforge.io/guides/developing-with-wsl