maps icon indicating copy to clipboard operation
maps copied to clipboard

Cannot destructure property 'RNMapboxMapsImpl' of 'undefined' as it is undefined.

Open EmanuelCAC opened this issue 8 months ago • 2 comments

Environment

  • Dev OS: Win11
  • @rnmapbox/maps version: rnmapbox/maps#main
  • React Native version: 0.76.9
  • Expo version: ~52.0.43

Steps to reproduce

npx create-expo-app rntest
cd rntest
npx expo install rnmapbox/maps#main

Edit your dependencies in the package.json to look like this:

"undefined": "rnmapbox/maps#main" -> "@rnmapbox/maps": "rnmapbox/maps#main",

package.json package-lock.json

Run:

npm i
eas login
eas build:configure
npx expo install expo-dev-client

Add pluggin configuration:

"@rnmapbox/maps",
      {
        "RNMapboxMapsDownloadToken": "sk.ey...8g",
        "RNMapboxMapsVersion": "10.16.2"
      }

Run:

eas build --profile development --platform android

Error:

Failed to read the app config from the project using "npx expo config" command: npx expo config --json exited with non-zero code: 1.
Falling back to the version of "@expo/config" shipped with the EAS CLI.
Cannot destructure property 'RNMapboxMapsImpl' of 'undefined' as it is undefined.
    Error: build command failed.

EmanuelCAC avatar Apr 10 '25 12:04 EmanuelCAC

@EmanuelCAC i solved this issue by changing expo.plugins from this:

"plugins": [
      "expo-router",
      "./plugins/withReactNativeMapsWorkaround",
      "expo-location",

      "expo-image-picker",
      "@rnmapbox/maps" ,   {
        "RNMapboxMapsDownloadToken": "sk.ey...8g",
        "RNMapboxMapsVersion": "10.16.2"
      }
    ],

to this:

   "plugins": [
      "expo-router",
      "./plugins/withReactNativeMapsWorkaround",
      "expo-location",

      "expo-image-picker",
      [
        "@rnmapbox/maps" ,   {
          "RNMapboxMapsDownloadToken": "sk.ey...8g",
          "RNMapboxMapsVersion": "10.16.2"
        }
      ]
    ],

svenhue avatar Apr 12 '25 10:04 svenhue

I assume this was a config error, not a bug in rnmapbox/maps

mfazekas avatar Sep 12 '25 09:09 mfazekas