Packaging up Create-react-app and electron error
See original GitHub issueI am packaging up my electron app electron-builder"
after I build the Create-react-app react-scripts build
.
The error I receive when I try to run my packaged app is:
Not allowed to load local resource:
file:///Users/profile/app/dist/mac/App.app/Contents/Resources/app.asar/build/index.html
Am I missing a step, to package the react app with electron?
the main.js is one level deeper in from the build folder,
Here is the url in my main.js
const startUrl = process.env.ELECTRON_START_URL || url.format({
pathname: path.join(__dirname, '/../build/index.html'),
protocol: 'file:',
slashes: true
});
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
How to build an Electron app using create-react-app ... - Medium
I recently built an Electron app using create-react-app. I didn't need to muck about with Webpack, or “eject” my app, either. I'll walk...
Read more >Building a desktop app with Electron and Create React App
A step-by-step tutorial explaining how to create a desktop application using Create React App (CRA) and Electron.
Read more >React App Not Loading into The Packaged Electron App
I ran npm run build first to package my react application so that i would actually have a build folder. In my case,...
Read more >Electron Apps Made Easy with Create React App and Electron ...
Import the project into the Electron Forge workflow so that it can easily be packaged up for distribution. We'll take care of the...
Read more >Create React App without Create React App - Bits and Pieces
Step by Step · 1. Make sure node is installed in your system · 2. Create project folder and package.json · 3. Install...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Still not working. I’m getting a blank screen
Please consider to use short form like
file://${__dirname}/../build/index.html
Have you read https://medium.com/@kitze/️-from-react-to-an-electron-app-ready-for-production-a0468ecb1da3? What electron-builder version do you use?