ProgressNS / nativescript-ui-feedback

This repository is used for customer feedback regarding Telerik UI for NativeScript. The issues system here is used by customers who want to submit their feature requests or vote for existing ones.
Other
115 stars 21 forks source link

nativescript-ui-sidedrawer 9.0.3 crashed fresh app #1470

Open aquinn637 opened 3 years ago

aquinn637 commented 3 years ago

I created a new blank app with the command: tns create Angular9SideDrawer --template tns-template-blank-ng

It provided me with a fresh Angular 8.2 project. When I ran tns run android it was working fine.

After I added this plugin 9.0.3 and added it to my main module, it broke.

app.module

import { NgModule, NO_ERRORS_SCHEMA } from "@angular/core";
import { NativeScriptModule } from "nativescript-angular/nativescript.module";
import { NativeScriptUISideDrawerModule } from 'nativescript-ui-sidedrawer/angular';
import { AppRoutingModule } from "./app-routing.module";
import { AppComponent } from "./app.component";

@NgModule({
    bootstrap: [
        AppComponent
    ],
    imports: [
        NativeScriptModule,
        AppRoutingModule,
        NativeScriptUISideDrawerModule
    ],
    declarations: [
        AppComponent
    ],
    schemas: [
        NO_ERRORS_SCHEMA
    ]
})
export class AppModule { }

package.json

{
  "nativescript": {
    "id": "org.nativescript.Angular9SideDrawer",
    "tns-android": {
      "version": "6.5.0"
    },
    "tns-ios": {
      "version": "6.5.0"
    }
  },
  "description": "NativeScript Application",
  "license": "SEE LICENSE IN <your-license-filename>",
  "repository": "<fill-your-repository-here>",
  "dependencies": {
    "@angular/animations": "~8.2.0",
    "@angular/common": "~8.2.0",
    "@angular/compiler": "~8.2.0",
    "@angular/core": "~8.2.0",
    "@angular/forms": "~8.2.0",
    "@angular/platform-browser": "~8.2.0",
    "@angular/platform-browser-dynamic": "~8.2.0",
    "@angular/router": "~8.2.0",
    "@nativescript/theme": "~2.3.0",
    "nativescript-angular": "~8.21.0",
    "nativescript-ui-sidedrawer": "^9.0.3",
    "reflect-metadata": "~0.1.12",
    "rxjs": "^6.4.0",
    "tns-core-modules": "~6.5.0",
    "zone.js": "~0.9.1"
  },
  "devDependencies": {
    "@angular/compiler-cli": "~8.2.0",
    "@ngtools/webpack": "~8.2.0",
    "nativescript-dev-webpack": "~1.5.0",
    "typescript": "~3.5.3"
  },
  "gitHead": "20a65d338ae8f8911087ab6615b89363f864b07b",
  "readme": "NativeScript Application"
}

tns run android gave this error

System.err: An uncaught Exception occurred on "main" thread.
System.err: Unable to create application com.tns.NativeScriptApplication: com.tns.NativeScriptException: Error calling module function 
System.err: TypeError: Class extends value undefined is not a constructor or null
System.err: File: (file: node_modules/nativescript-ui-sidedrawer/ui-sidedrawer.common.js:27:66)
System.err: 
System.err: StackTrace: 
System.err: ../node_modules/nativescript-ui-sidedrawer/ui-sidedrawer.common.js(file: node_modules/nativescript-ui-sidedrawer/ui-sidedrawer.common.js:27:66)
System.err:     at __webpack_require__(file: src/webpack/bootstrap:750:0)

I downgraded the plugin to version 8.0.1. My application is working again.

Here is the sample code: https://github.com/aquinn637/Angular9SideDrawer