-
Notifications
You must be signed in to change notification settings - Fork 186
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
Nextjs Import Error #487
Comments
Mapbox could fix this by importing
instead of importing
in their sdk |
For future on-lookers: I worked around this by adding I'll leave this open to let mapbox decide if they want properly fix it or ignore it. |
If you are using Next.js 15 I managed to fix this with https://rc.nextjs.org/docs/app/api-reference/next-config-js/serverExternalPackages const nextConfig = {
serverExternalPackages: ['@mapbox/mapbox-sdk'],
} |
Next.js 14 has an experimental flag for this as well: const nextConfig = {
experimental: {
serverComponentsExternalPackages: ["@mapbox/mapbox-sdk"],
},
} |
I'm having trouble using the SDK in Next.js
I'm trying to (only) use the Geocoding service to retrieve Coordinates:
But I get this error when Next.js tries to build my project with
@mapbox/mapbox-sdk
importedSeems to be coming from
keyv
incacheable-request
that's used bygot
package. I tried to override the package to the latest version, but no dice.Anyone experienced this before?
The text was updated successfully, but these errors were encountered: