ReferenceError: _wrapNativeSuper is not defined #1413
Replies: 7 comments 4 replies
-
I'm using angular and ngx-maplibre as a wrapper without any issues. |
Beta Was this translation helpful? Give feedback.
-
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? |
Beta Was this translation helpful? Give feedback.
-
We moved to Line 13 in 952f1cd 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/maplibre-gl@2.2.0-pre.3/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... |
Beta Was this translation helpful? Give feedback.
-
I had the same issue. My solution was to set "target" to "es6" or higher in tsconfig.json compilerOptions |
Beta Was this translation helpful? Give feedback.
-
I had this issue too with an angular project, turns out I was still supporting IE 9-11 in the .browserslistrc file I changed it to
And it works, you might want to see if you have that file, I believe it can live inside the package.json too |
Beta Was this translation helpful? Give feedback.
-
Just in case anyone else runs into this issue, it is related to this upstream bug browserslist/browserslist#374, and the minimal fix is to add |
Beta Was this translation helpful? Give feedback.
-
We get the same error, but only on windows. It works fine on linux and on macOS. Any ideas for potential fixes? |
Beta Was this translation helpful? Give feedback.
-
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
(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?
Beta Was this translation helpful? Give feedback.
All reactions