Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

ReferenceError: _wrapNativeSuper is not defined #1412

Closed
cns-solutions-admin opened this issue Jul 27, 2022 · 3 comments
Closed

ReferenceError: _wrapNativeSuper is not defined #1412

cns-solutions-admin opened this issue Jul 27, 2022 · 3 comments

Comments

@cns-solutions-admin
Copy link
Contributor

I have upgraded our (quite large) react application to MapLibre 2.2.0-pre.3:
It builds, but when the map should be shown, I get

ReferenceError: _wrapNativeSuper is not defined

(at least the first such error seems to occur with ajax.ts)

I've tried everything mentioned in #1011, but still no success (we never supported IE).
As I understand _wrapNativeSuper is something introduced by building with babel or so.

Are there any minimum versions for React, babel, webpack or other build-related libraries?

@HarelM
Copy link
Collaborator

HarelM commented Jul 27, 2022

I'm using angular and ngx-maplibre as a wrapper without any issues.
I suggest to open a issue with the relevant wrapper you use as this is not an issue with this library as far I understand...

@cns-solutions-admin
Copy link
Contributor Author

It most probably is no problem with maplibre per se, but with maplibre 1.5 everything was fine and the only change was upgrading maplibre and fixing the compile problems. And the problem does only occur, when activating the map view.

So, maybe the build process or some relevant dependencies changed in maplibre between 1.5 and 2.2?
Something important must have changed as indicated by #1011, where only some obscure workaround is mentioned (which doesn't work for me).
Any hints are welcome.

@HarelM
Copy link
Collaborator

HarelM commented Jul 27, 2022

We moved to type: "module" in order to allow new language features from node js for our development.

"type": "module",

But the library itself is still exported as commonjs which is the major change you are talking about.
This is why we are adding a package.json file to indicate that in the dist folder:
https://unpkg.com/browse/[email protected]/dist/package.json
I know that webpack adheres to that file, not sure about other packagers...
I'm converting this to a discussion with your permission...

@maplibre maplibre locked and limited conversation to collaborators Jul 27, 2022
@HarelM HarelM converted this issue into discussion #1413 Jul 27, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants