nativescript-google-maps-sdk: TypeError: Class constructor View cannot be invoked without 'new'
TypeError: Class constructor View cannot be invoked without 'new'
NativeScript 7 with Vue.js when trying to create the map.
About this issue
- Original URL
- State: open
- Created 4 years ago
- Comments: 26 (5 by maintainers)
So my issue turned out be the handling of the plugin by babel
presets: [ [ '@babel/preset-env', { targets: { esmodules: true }, ----> include: ["transform-classes"] } ] ],
the inclusion of “include”:“[transform-classes”] solved it for me, I arrived to this answer through this https://stackoverflow.com/questions/36577683/babel-error-class-constructor-foo-cannot-be-invoked-without-new answer. I hope this helps someone.
Okay! Does it happen with the stable version of the plugin and nativescript 7+ or with the plugin version of #420? (nativescript 7 compatibility PR)
sorry, don’t replace map-view.d.ts by a js file but by the ts file I attach a zip file with the files I used maps.zip
@benco8186 try this: