Closed gc-octopis closed 12 months ago
Ah yes, this broke after some dependency-update, possibly https://github.com/mb21/panwriter/commit/6ddb7bdfe3ca8b3504b0c31d027688cbda4dfb8b
Sorry, I meant to fix this... for the time being, you can run npm run start
in one terminal (to start the react app), and then ELECTRON_IS_DEV=1 npm run electron
in another terminal (to start the electron main process and browser).
Ah, I think I fixed it with https://github.com/mb21/panwriter/commit/416a006a63e3685e3be46db9d600d424d883d645 ?
Oh thanks a lot, after I copied the edited command to my project, it works on my linux machine.
but there is still some errors on the windows side, and I'll probably figure it out later since it seems to be a issue with the different OS or just different Node or React version.
Well, the Windows' error turns out can be fixed with cross-env
.
Just also install it after you run npm ci
with the command below.
npm install cross-env
And add cross-env
before all commands contains environment variables (basically when you see a =
sign)
for example, the npm run electron:dev
from package.json
's command will turn to:
"electron:dev": "concurrently \"cross-env BROWSER=none npm start\" \"wait-on http://127.0.0.1:3000 && npm run electron:tsc && cross-env ELECTRON_IS_DEV=1 electron .\"",
(as you can see, I added cross-env
twice before both environment variables, BROWSER=none
and ELECTRON_IS_DEV=1
)
Hope this will help any future developer who wants to work with Windows OS
Excuse me,
Recently, I forked panwriter and just gonna start developing.
I have installed volta, cloned my repo and ran
npm ci
then I tried
npm run electron:dev
this error poped up:
there were also some warnings while compiling, but I don't think it matters the error shown above, if needed I'll paste it later.
I've tested on both windows and ubuntu(Linux) both got the error above.
Does anyone know what cause the error? Or what I missed when installing? Thanks a lot.