Capacitor: Electron does not work anymore

Created on 6 Dec 2018  路  7Comments  路  Source: ionic-team/capacitor

When running

npm run electron:start

got the following errors:

  • No @ionic/core ToastController detected, please make sure ....
  • Get file:///runtime.js net::ERR_FILE_NOT_FOUND
  • Get file:///polyfill.js net::ERR_FILE_NOT_FOUND
  • Get file:///styles.js net::ERR_FILE_NOT_FOUND
  • Get file:///vendor.js net::ERR_FILE_NOT_FOUND
  • Get file:///main.js net::ERR_FILE_NOT_FOUND

Most helpful comment

It is working fine, for a capacitor ionic-angular application if in the index.html you change <base href="/" /> by <base href="./" /> . in a capacitor ionic-vue project you must add a vue.config.js file in the project folder which contains module.exports = { baseUrl: "./" };. I didn't test an app with tabs so try

All 7 comments

I get the same error.

angular: 7.1.2
capacitor: 1.0.0-beta.11
ionic/angular": 4.0.0-beta.15-0
ionic-native: 5.0.0-beta.22

I get the same error No @ionic/core ToastController detected, please make sure... But I fixed the others - had to set the build baseUrl to '' (empty string).

Vue: 2.5.17
Capacitor: 1.0.0-beta.11
ionic/pwa-elements: 1.0.0

Solve in Capacitor 1.0.0-beta.13

Sorry but still repro in 1.0.0-beta.13? It happens when there're tabs. I have to change 2 things:

  1. Change base from "/" to ""
  2. Copy js scripts from app folder to app/tabs folder

It is working fine, for a capacitor ionic-angular application if in the index.html you change <base href="/" /> by <base href="./" /> . in a capacitor ionic-vue project you must add a vue.config.js file in the project folder which contains module.exports = { baseUrl: "./" };. I didn't test an app with tabs so try

I have the same problem and still wasn't able to figure a way to run electron (capacitor ionic 4 vue project net::ERR_FILE_NOT_FOUND
)
I Added vue.config.js module.exports = {publicPath: './',}
and added in index.html when running yarn run electron:start the application Never progress beyond that
yarn run v1.15.2
warning ../../../../../../package.json: No license field
$ electron ./

That issue is back.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

peterpeterparker picture peterpeterparker  路  3Comments

daniel-lucas-silva picture daniel-lucas-silva  路  3Comments

peterpeterparker picture peterpeterparker  路  3Comments

alexcroox picture alexcroox  路  3Comments

ebk46 picture ebk46  路  3Comments