-
I try to build the most basic maplibre example as node module, but without success. What am I doing wrong?
This throws this error:
Or is this not working yet, because related to #1595? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
Have you tried |
Beta Was this translation helpful? Give feedback.
-
Since I don't think this is a real issue I'm converting it to a discussion. |
Beta Was this translation helpful? Give feedback.
-
maplibre-gl can't run as is on node environment as it uses a lot of things that are available only in the browser. |
Beta Was this translation helpful? Give feedback.
-
Are you able to use maplibre-native or is there a reason you want maplibre-gl-js ? we just released our first node prerelease there. |
Beta Was this translation helpful? Give feedback.
maplibre-gl can't run as is on node environment as it uses a lot of things that are available only in the browser.
Having said that, we are able to mock some of the things when we run the jest unit tests and the render-tests which run on node.
Feel free to look at the code there and understand what is needed in order to run it on node environment.
Note that it's not an easy task :-)