Skip to content
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

Crash when imported under Node #950

Closed
Pessimistress opened this issue Feb 5, 2022 · 2 comments
Closed

Crash when imported under Node #950

Pessimistress opened this issue Feb 5, 2022 · 2 comments

Comments

@Pessimistress
Copy link
Contributor

maplibre-gl-js version: 2.1.1

browser: node.js

Steps to Trigger Behavior

In Node, run require('maplibre-gl')

Expected Behavior

Successfully imports the library

Actual Behavior

Throws error Uncaught ReferenceError: performance is not defined

This breaks server-side rendering unless the user application dynamically imports this dependency based on the runtime environment. This was fixed in mapbox-gl v1.11 by mapbox/mapbox-gl-js#9749

@HarelM
Copy link
Collaborator

HarelM commented Feb 5, 2022

Seems like a duplicate if #791

@HarelM
Copy link
Collaborator

HarelM commented Feb 11, 2022

Duplicate of #768

@HarelM HarelM marked this as a duplicate of #768 Feb 11, 2022
@HarelM HarelM closed this as completed Feb 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants