johndyer24 / electron-cra-example

Example of how to structure an Electron app with Create React App
https://medium.com/@johndyer24/creating-and-deploying-an-auto-updating-electron-app-for-mac-and-windows-using-electron-builder-6a3982c0cee6
53 stars 20 forks source link

windows bug #1

Open AshtonScalise opened 4 years ago

AshtonScalise commented 4 years ago

I'm getting this error

The syntax of the command is incorrect.


ROBOCOPY :: Robust File Copy for Windows

Started : Saturday, February 29, 2020 21:32:03 Source : C:\ReactApps\111\electron-cra-example\src\shared\ Dest : C:\ReactApps\111\electron-cra-example\build\src\shared\

Files : *.*

Options : . /S /DCOPY:DA /COPY:DAT /R:1000000 /W:30


      New Dir          1    C:\ReactApps\111\electron-cra-example\src\shared\

100% New File 72 constants.js


           Total    Copied   Skipped  Mismatch    FAILED    Extras
Dirs :         1         1         0         0         0         0

Files : 1 1 0 0 0 0 Bytes : 72 72 0 0 0 0 Times : 0:00:00 0:00:00 0:00:00 0:00:00

Speed : 72000 Bytes/sec. Speed : 4.119 MegaBytes/min. Ended : Saturday, February 29, 2020 21:32:03

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! electron-cra-example@0.1.0 build-electron-win: mkdir build/src && robocopy electron build/electron /S & robocopy src/shared build/src/shared /S npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the electron-cra-example@0.1.0 build-electron-win script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\ashto\AppData\Roaming\npm-cache_logs\2020-03-01T03_32_03_310Z-debug.log

sikfreeze commented 4 years ago

I changed && to &. Got it successfully built but after the installation, I only got white screen

sikfreeze commented 4 years ago

I changed && to &. Got it successfully built but after the installation, I only got white screen

Turned out I forgot to run "npm run build" before "npm run build-electron-win" ...now everything is working

cnscorpions commented 3 years ago

I can not run this project. @sikfreeze could you please share steps for running it? my os is win10 pro.

yarn

yarn start-electron-win not work, just got white screen 😂

MarlboroJamez commented 2 years ago

So for anyone using this in 2021, there are only a few steps to consider regarding to using windows.

in order to run this wonderful project, which I really do appreciate! you need to do the following:

npm install (to install all the dependencies)
npm run build (build out the reactjs)
npm run build-electron-win (set up & copy over the needed directories)

in the package.json file
there seems to be a issue on the script "package-win"
it's not copying over the electron file over to the build folder
so you can either update the script or simply just copy your electron file into the build folder created
before running "package-win"