nativescript-imagepicker icon indicating copy to clipboard operation
nativescript-imagepicker copied to clipboard

Class constructor Observable cannot be invoked without 'new' Nativescript 7.0.0

Open stefanoScalzo opened this issue 4 years ago • 3 comments

Make sure to check the demo app(s) for sample usage

Make sure to check the existing issues in this repository

If the demo apps cannot help and there is no issue for your problem, tell us about it

Please, ensure your title is less than 63 characters long and starts with a capital letter. When using the sample code, imagepicker.create({mode:"single"}) throws Class constructor Observable cannot be invoked without 'new' error

Which platform(s) does your issue occur on?

IOS

  • emulator: iPhone 11

Please, provide the following version numbers that your issue occurs with:

  • CLI: (run tns --version to fetch it) 7.0.0
  • Cross-platform modules: (check the 'version' attribute in the node_modules/tns-core-modules/package.json file in your project) no tns-core-modules in NS7.0.0
  • Runtime(s): (look for the "tns-android" and "tns-ios" properties in the package.json file of your project)
  • Plugin(s): (look for the version numbers in the package.json file of your project and paste your dependencies and devDependencies here)

Please, tell us how to recreate the issue in as much detail as possible.

copy paste the code from the demo in a fresh application run the application It will create an error

Is there any code involved?

  • provide a code example to recreate the problem
  • (EVEN BETTER) provide a .zip with application or refer to a repository with application where the problem is reproducible.
import * as imagepicker from 'nativescript-imagepicker'; 
var context = imagepicker.create({
      mode: "single"
  });

  context
      .authorize()
      .then(function() {
          return context.present();
      })
      .then(function(selection) {
          console.log("Selection done:");
          selection.forEach(function(selected) {
              console.log(" - " + selected);
          });
      }).catch(function (e) {
          console.log(e);
      });

stefanoScalzo avatar Dec 31 '20 05:12 stefanoScalzo

Same problem

cobreen avatar Jan 07 '21 16:01 cobreen

Anyone have a fix? Thanks!

NathanVPIX avatar Jan 15 '21 04:01 NathanVPIX

import * as imagepicker from "@nativescript/imagepicker"; for nativescript version 7

ecnerret-adajet avatar Feb 01 '21 08:02 ecnerret-adajet