-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
error TS2307: Cannot find module 'mapbox-gl/dist/mapbox-gl.js'. #3767
Comments
If Mapbox does work even with the error, are you sure this is not a TypeScript bug? |
I was able to get around this issue by using this import instead:
But not all is fixed by this. I'm using Rollup for bundling and this has now caused an error:
|
Using |
I am getting an error when trying to import
mapboxgl
into my TypeScript file.mapbox-gl-js version: 0.28.0
Steps to Trigger Behavior
import mapboxgl from 'mapbox-gl/dist/mapbox-gl.js';
tsc
Expected Behavior
No error to be outputted, as mapbox does in fact work even though this error is outputted
Actual Behavior
Error is outputted although mapbox still works fine:
error TS2307: Cannot find module 'mapbox-gl/dist/mapbox-gl.js'.
The text was updated successfully, but these errors were encountered: