Skip to content

import as node module fails #1668

Answered by HarelM
geraldo asked this question in Q&A
Sep 19, 2022 · 4 comments · 2 replies
Discussion options

You must be logged in to vote

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 :-)

Replies: 4 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@geraldo
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by geraldo
Comment options

You must be logged in to vote
1 reply
@acalcutt
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #1667 on September 19, 2022 17:23.