shiv19 / nativescript-cfalert-dialog

CFAlertDialog Wrapper for NativeScript
Apache License 2.0
42 stars 21 forks source link

Cannot read property 'Builder' of undefined in version 3.4.0 #2

Closed yclau closed 6 years ago

yclau commented 6 years ago

Which platform(s) does your issue occur on?

I added plugin using tns plugin add nativescript-alert-dialog, and added the codevar aaa = require("nativescript-cfalert-dialog"); , after shown Cannot read property 'Builder' of undefined. below is my package.json.

{
  "description": "NativeScript Application",
  "license": "SEE LICENSE IN <your-license-filename>",
  "readme": "NativeScript Application",
  "repository": "<fill-your-repository-here>",
  "nativescript": {
    "id": "com.dapaolah.client",
    "tns-android": {
      "version": "3.4.0"
    },
    "tns-ios": {
      "version": "3.4.0"
    }
  },
  "dependencies": {
    "nativescript-barcodescanner": "^2.7.4",
    "nativescript-camera": "^3.1.4",
    "nativescript-cfalert-dialog": "^1.0.5",
    "nativescript-checkbox": "^3.0.3",
    "nativescript-directions": "^1.1.0",
    "nativescript-feedback": "^1.1.0",
    "nativescript-fonticon": "^1.1.1",
    "nativescript-geolocation": "^3.0.0",
    "nativescript-google-maps-sdk": "^2.4.3",
    "nativescript-localize": "^2.0.1",
    "nativescript-localstorage": "^1.1.5",
    "nativescript-phone": "^1.3.1",
    "nativescript-plugin-firebase": "^5.0.1",
    "nativescript-pro-ui": "^3.1.4",
    "nativescript-slideshow-busy-indicator": "^3.0.1",
    "nativescript-social-share": "^1.5.0",
    "nativescript-theme-core": "~1.0.2",
    "nativescript-zxing": "^1.5.2",
    "tns-core-modules": "^3.4.0"
  },
  "devDependencies": {
    "babel-traverse": "6.4.5",
    "babel-types": "6.4.5",
    "babylon": "6.4.5",
    "copy-webpack-plugin": "~4.0.1",
    "css-loader": "~0.28.7",
    "extract-text-webpack-plugin": "~3.0.0",
    "lazy": "1.0.11",
    "nativescript-dev-android-snapshot": "^0.*.*",
    "nativescript-dev-webpack": "^0.9.0",
    "nativescript-worker-loader": "~0.8.1",
    "raw-loader": "~0.5.1",
    "resolve-url-loader": "~2.1.0",
    "webpack": "~3.8.1",
    "webpack-bundle-analyzer": "^2.8.2",
    "webpack-sources": "~1.0.1"
  }
}
lin-brian-l commented 6 years ago

I got this error too, but when I originally tested out the plugin with the Nativescript "Hello World" template, it worked fine. Perhaps this is a compatibility issue with one of the other plugins? I'm also using the camera, geolocation, google-maps-sdk, phone, and pro-ui dependencies.

shiv19 commented 6 years ago

Can you try doing tns platform remove android, tns run android, after adding the plugin?

lin-brian-l commented 6 years ago

That did the trick, thank you for the help!