Skip to content

[beta19] Uncaught SyntaxError: Use of const in strict mode. vendor.js #16781

Closed

Description

@shaxxx

Bug Report

Ionic version:

[x] 4.0.0-beta.19

Current behavior:
Ionic Beta 19 sidemenu starter project does not work on Android devices with webview version < 54 (versions with no CSS vars, and no shadow DOM). I'm getting blank screen on webview version 33 and 44 with all the polyfills uncommented. Both devcat & Chrome developer console reports error:

Uncaught SyntaxError: Use of const in strict mode. vendor.js

on the line that declares ICON_PATHS

const ICON_PATHS = {....

Screenshot HERE

Tested on
Samsung Galaxy Nexus I9250
Android KitKat 4.4.4
WebView (33.0.0.0)

Android x86 Emulator
Android Marshmallow 6.0
WebView (44.0.2403.119)

Expected behavior:
Working app with working sidemenu and pages.

Steps to reproduce:

npm install -g ionic@latest
ionic start beta19 sidemenu --type=angular
cd beta19
//delete node_modules folder
//update package.json to reference "@ionic/angular": "^4.0.0-beta.19"
//update packages.json and change all  @angular/ references to "~7.1.3"
// uncomment all imports from src/polyfills.ts
//add 
//  import 'core-js/es6/promise';
//to src/polyfills.ts
npm install --save classlist.js
npm install --save web-animations-js
ionic cordova run android

Ionic info:

Ionic:

   ionic (Ionic CLI)             : 4.5.0 (C:\Users\isako\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework               : @ionic/angular 4.0.0-beta.19
   @angular-devkit/build-angular : 0.10.7
   @angular-devkit/schematics    : 7.1.3
   @angular/cli                  : 7.1.3
   @ionic/angular-toolkit        : 1.2.0

Cordova:

   cordova (Cordova CLI) : 8.1.2 ([email protected])
   Cordova Platforms     : android 7.1.4
   Cordova Plugins       : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.3.1, (and 4 other plugins)

System:

   Android SDK Tools : 26.1.1 (C:\Program Files (x86)\Android\android-sdk)
   NodeJS            : v8.12.0 (C:\Program Files\nodejs\node.exe)
   npm               : 6.4.1
   OS                : Windows 10

Activity

  1. shaxxx commented on Dec 17, 2018

    @shaxxx
    Author

    #15038 was not Ionic3 bug (hello ionitron-bot)
    #15438 is not fixed

  2. added a commit that references this issue on Dec 17, 2018
    e1b993f
  3. manucorporat commented on Dec 17, 2018

    @manucorporat
    Contributor

    Thanks for reporting the issue! We already have a PR that fixes it

  4. added a commit that references this issue on Dec 17, 2018
    c9cef12
  5. shaxxx commented on Dec 17, 2018

    @shaxxx
    Author

    @manucorporat Thank you for the quick feedback!
    I have updated ionic/core dependency to ionicons 4.5.1 in node_modules and did
    npm install ionicons@latest
    and can confirm this error is resolved.

    Since I'm not sure my testing method is correct I just wanted to check with you before opening another issue since it's still not working and not sure if this is separate issue, or my methodology is wrong.

    Here's the error in developer console HERE
    More details HERE
    And a brakepoint HERE

    Once again, thanks for the effort.

    EDIT: Nevermind, found breaking changes

  6. ionitron-bot commented on Jan 16, 2019

    @ionitron-bot

    Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

  7. locked and limited conversation to collaborators on Jan 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions