-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: Class constructor View cannot be invoked without 'new' #433
Comments
Same error with NativeScript 7.0.8 with typescript (NativeScript Core) |
Same error |
same error w/ Nativescript 7.0.7 with JS (NativeScript Vue) |
I managed to invoke this error by trying to create an instance outside of the registerElement |
So my issue turned out be the handling of the plugin by babel
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. |
Hi, could you show your code please? I include a .babelrc file with your presets but this solution doesn't work for me :( |
@benco8186
|
Thank you, but it still doesn't work, may be it's because i'm using angular and not vue, also i'm not on nativescript 7, i use nativescript 6.5.3 |
I have created a fork and updated nativescript dependencies and typescript compiler version, if you compile the files and replace in the node module by these (map-view-common.js,map-view.android.js,map-view.ios.js,map-view.d.js),it works |
Tried but wasn't able to get this achieved |
Clone my fork, in the src folder open a terminal and run npm install, then tsc, don't worry about error informations. After that copy the .js files and in your project, in the original dependency nativescript maps sdk (in node_module), paste these files (replace the Originals). Normally that will work |
I tried this and now I got new error : Error: This value is not a native object. |
getting the same error |
see #420 |
sorry, don't replace map-view.d.ts by a js file but by the ts file |
@hypery2k cool staff 👍 the infoWindowTemplate does not showing on ! |
hi @kefahB, when the infoWindow is not showing? thx |
@funder7 .. this happen when I click on the marker .. I've did some debugs, it seems the infowindow does not exist at all on the plugin side. |
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) |
It work as expected with NS6.3 |
@benco8186 got this worked..but cameraChanged function not working after i tired this...!!! |
I could not get this working either with NS7. But as documented here a bit, I was having problems still trying to use the old CLI with ios. So I'm basically using NS7 cli with my NS6 project, and it seems to work I just have to use |
@benco8186 same issue |
Hi, to resolve this issue you should declare "plugins": [{
"transform": "@nativescript/webpack/transformers/ns-transform-native-classes",
"type": "raw"
}] and edit package.json at the script key like this : "build": "npm run clean && ts-patch install && tsc", |
same error...anyone handle this problem ...please describe breafly |
Hi every one, this repo isn’t maintained frequently, try This plugin |
TypeError: Class constructor View cannot be invoked without 'new'
NativeScript 7 with Vue.js when trying to create the map.
The text was updated successfully, but these errors were encountered: