Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70433

Electron - falling at the first hurdle

$
0
0

@paulbutcher wrote:

I’m very new to Ionic, so please forgive me If I’m missing something basic. I’ve got a long way towards getting my app working on web, iOS and Android. I’m now trying to get it to work with Electron, and hitting problems. So I decided to go back to basics and see if I could get a project created by ionic start working. And the answer is no :frowning_face:.

If I run the following:

ionic start MyTestApp --type react blank
cd MyTestApp
ionic build
ionic cap add electron
ionic cap open electron

It fails with:

index.html:1 GET file:///static/css/12.8921c4c4.chunk.css net::ERR_FILE_NOT_FOUND

The problem seems to be that the generated React project is expecting to find files in the root directory, where Electron is loading them using absolute file: URLs. I’ve tried playing around with setting homepage in package.json and removing the <base> tag in index.html with some success (I can get the static files loading initially), but I rapidly run into more problems.

This problem doesn’t seem to be React specific—I see similar issues if I create an Angular project instead.

Should I expect this to work? Are there any examples that I can look at of getting Ionic to play nicely with Electron?

Posts: 2

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70433

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>