dapriett / nativescript-google-maps-sdk

Cross Platform Google Maps SDK for Nativescript
MIT License
244 stars 169 forks source link

Class constructor ActionItem cannot be invoked without 'new' #510

Closed AttilioCapocchiani closed 10 months ago

AttilioCapocchiani commented 10 months ago

Hi All,

I'm trying to run this code on nativescript-vue

<ActionBar title="Week Plan">
  <ActionItem @tap="goToSettings" ios.systemIcon="9" ios.position="left" android.systemIcon="ic_menu_share" android.position="actionBar" />
</ActionBar>```

When I run the application I get this error

Restarting application on device emulator-5554...
  JS: CONSOLE LOG: NativeScript-Vue has "Vue.config.silent" set to true, to see output logs set it to false.
  System.err: An uncaught Exception occurred on "main" thread.
  System.err: Unable to start activity ComponentInfo{org.nativescript.healthyme/com.tns.NativeScriptActivity}: com.tns.NativeScriptException: Calling js method onCreate failed
  System.err: TypeError: Class constructor ActionItem cannot be invoked without 'new'
  System.err:
  System.err: StackTrace:
  System.err: resolveAsyncComponent(file: app/webpack:/healthy-me/node_modules/nativescript-vue/dist/index.js:4585:0)
  System.err:   at createComponent(file: app/webpack:/healthy-me/node_modules/nativescript-vue/dist/index.js:4097:0)
  System.err:   at _createElement(file: app/webpack:/healthy-me/node_modules/nativescript-vue/dist/index.js:4321:0)
  System.err:   at createElement$1(file: app/webpack:/healthy-me/node_modules/nativescript-vue/dist/index.js:4252:0)

Commenting the ActionItem makes the code work but I would like to understand how I can use this standard component in my code. I'm running ubuntu targetting android

AttilioCapocchiani commented 10 months ago

Sorry, wrong repo to open this...