-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[Bug] Incorrect types causing build to fail while using Vite #1798
Labels
Comments
Seems that the string indexed fields must be more generic than the specific ones: https://www.typescriptlang.org/docs/handbook/interfaces.html#indexable-types |
Merged
Published 7.0.10 |
Thank you @Pessimistress! |
Hi @Pessimistress 👋 I'm having the same issue in two places:
I'm on version |
trumbitta
added a commit
to trumbitta/react-map-gl
that referenced
this issue
Aug 9, 2023
@Pessimistress sorry to bother you with another mention: I also prepared a PR for this: #2250 |
trumbitta
added a commit
to trumbitta/react-map-gl
that referenced
this issue
Aug 10, 2023
trumbitta
added a commit
to trumbitta/react-map-gl
that referenced
this issue
Aug 10, 2023
trumbitta
added a commit
to trumbitta/react-map-gl
that referenced
this issue
Aug 11, 2023
Pessimistress
pushed a commit
that referenced
this issue
Aug 11, 2023
Pessimistress
pushed a commit
that referenced
this issue
Aug 18, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Hello! I'm experiencing an issue using react-map-gl with a Vite generated project. When I build my project, I'm presented with the following error:
This doesn't seem to happen using CRA and I can remedy this by swapping
skipLibCheck
to false in the tsconfig, but that doesn't seem correct. I'm unsure if this is a TypeScript issue, Vite issue, or a bug related to this library.I've created a test repo here: https://github.com/DennisMartinez/vite-react-map-gl-bug
Expected Behavior
To build without type errors.
Steps to Reproduce
Pull the test repo
Create a .env.local file and add your mapbox api token
Install the dependencies with
yarn install
Build the project with
yarn build
Observe the error in the console
Environment
The app was generated using vite react-ts.
Logs
Terminal error while building
The text was updated successfully, but these errors were encountered: