New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Application entry file reset to default (react-cra detected and config changed incorrectly) #2030
Comments
Please set env |
|
Workaround: please add |
Worked, thanks |
@develar Thanks, you fixed my problem. Do you mind briefly explaining why adding |
I'm in the same boat as @genepool99, I'm interested in understanding what exactly the change is doing. |
Added |
I am having the exact same issue. I have tried all fixes suggested above, but none of them work for me. |
For those who are using react in your app, you should use "react-scripts build" before trying to run electron-builder... "react-scripts build" will generate "build" folder which used by electron-builder(when preset=react-cra)...
|
@v-rumak yep! thank you so much! |
make sure guys to build electron app before run the builder comment. specially if using ts. |
@genepool99 @mhuggins, when we create a electron app with create-react-app, extends will set to "react-cra" automatically, as the official document wrote:
In the "react-cra" mode, the entry file will be set to "build/electron.js", while building, we don't have this file in the build folder, so this will cause the error. So set extends to null will remove this default entry point, the build will be fine. |
Worked, thank you so much. |
works, thanks. |
I was having the same issue with CRA and setting here's it from my "build": {
"extraMetadata": {
"main": "build/main.js"
}
} where |
As always, make sure you double-check the casing on your file names... too embarrassed to say how much time I just sunk into this. 😭 |
For me it solved by : as follows:
|
for me it worked including the files directly
|
worked, thx |
Hi, I have an issue where every time i run
build
it resets the package.json to the default pathbuild/electron.js
and thus giving me this error:Error: Application entry file "build/electron.js" does not exist. Seems like a wrong configuration.
this is my initial package.json
To
this is my folder structure
The text was updated successfully, but these errors were encountered: