question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Blank screen with IonReactRouter and Electron

See original GitHub issue

Description of the problem:

IonReactRouter does not work in Electron production builds. With Capacitor, it does not work whatsoever. The elements are present in the markup, but they are rendered invisible. Is it possible to allow IonReactRouter to have an additional API layer over the HashRouter instead of just BrowserRouter, which does not work with Electron?

Affected platform

  • Android
  • iOS
  • electron
  • web

OS of the development machine

  • Windows
  • macOS
  • linux

Other information:

Capacitor version: 1.1.1

node version: 10.16.3

npm version: 6.9.0

CocoaPods version: N/A

Steps to reproduce:

  1. Generated boilerplate code with ionic start ionic-electron sidemenu --capacitor --type=react

  2. Set homepage in package.json:

{
...
  "homepage": ".",
...
}
  1. Created a build with ionic build

  2. Initialized Electron project with npx cap add electron

  3. Copied project contents to electron project with npx cap copy

  4. Ran app with npx cap open electron

This issue happens with the component regardless of whether or not the project was bootstrapped with Capacitor.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:4
  • Comments:15 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
jcesarmobilecommented, Mar 2, 2020

If you read my comment in the issue I linked, I explained how to make it work for react. Also says it’s the same issue as https://github.com/ionic-team/capacitor/issues/639, which is open. So, why I closed it? Because it’s a duplicate of a duplicate

3reactions
andonivianezcommented, Mar 3, 2020

Mm…I think that it´s similar but not the same, as for example I get no errors in the console, but I´ve the same blank screen. The other one it´s related to errors of assets linking 😉 Anyway, thanks for your fast reply 😃 I didn´t see that related issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting blank screen in windows after electron-builder react ...
Here is package.json. Getting blank screen in windows after electron-builder react electron app. { "name": "SmallBusinessManagement" ...
Read more >
Ionic react app showing blank page after first state change ...
Coding example for the question Ionic react app showing blank page after first state change-Reactjs.
Read more >
Tutorial/guide to build for Ionic-React-Electron app - Capacitor
Electron page was visible, but blank (seems react components was not parsed correctly) ... Blank screen with IonReactRouter and Electron.
Read more >
What's new in Ionic React RC (and how to use it) - Enappd
It allows you to break down the components and create a single page ... for example, iOS, Android, Electron and in the browser...
Read more >
ionic Archives - LogRocket Blog
The developer community also created Electron-based desktop app generation support. ... I selected React and the blank template for this example.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found