capacitor: bug: Unable to upgrade an Aurelia app to Capacitor 3

Bug Report

I have followed the “Upgrading to 3.0” migration guide and am unable to get the plugins to work.

Capacitor Version

   Capacitor Doctor   

Latest Dependencies:

  @capacitor/cli: 3.4.0
  @capacitor/core: 3.4.0
  @capacitor/android: 3.4.0
  @capacitor/ios: 3.4.0

Installed Dependencies:

  @capacitor/core: 3.4.0
  @capacitor/cli: 3.4.0
  @capacitor/android: 3.4.0
  @capacitor/ios: 3.4.0

[success] Android looking great! 👌

Platform(s)

Web Android

Current Behavior

For Web: The following exception is thrown when a plugin method is called.

Uncaught (in promise) TypeError: Failed to fetch dynamically imported module: http://localhost:9009/scripts/web

I can call methods on the Capacitor global such as Capacitor.isNativePlatform() in the Chrome console.

For Android, the app hangs on the splash screen and the following Capacitor errors are in logcat:

E/Capacitor: Unable to read file at path public/plugins
E/Capacitor/Console: File: http://localhost/ - Line 286 - Msg: SyntaxError: Unexpected token .
E/Capacitor: JavaScript Error: {"type":"js.error","error":{"message":"Uncaught SyntaxError: Unexpected token .","url":"http://localhost/scripts/app-bundle.js","line":24206,"col":20,"errorObject":"{}"}}
E/Capacitor/Console: File: http://localhost/scripts/app-bundle.js - Line 24206 - Msg: Uncaught SyntaxError: Unexpected token .
E/Capacitor/Console: File: http://localhost/ - Line 286 - Msg: TypeError: Cannot read property '__useDefault' of undefined

Expected Behavior

Code Reproduction

Other Technical Details

The app is written in Aurelia V1 Bundler: Aurelia bundler Module Loader: requirejs

npm --version output: 6.14.8

yarn --version output: 1.22.5

node --version output: v14.15.1

pod --version output (iOS issues only):

Additional Context

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 20 (7 by maintainers)

Most upvoted comments

with au run it’s also working for me I attach your project with my modifications AureliaCapacitorAppUpdated.zip