Skip to content

Fix expo being unable to resolve config plugin#2515

Merged
mfazekas merged 1 commit intornmapbox:mainfrom
maartenweyns:main
Jan 4, 2023
Merged

Fix expo being unable to resolve config plugin#2515
mfazekas merged 1 commit intornmapbox:mainfrom
maartenweyns:main

Conversation

@maartenweyns
Copy link
Copy Markdown
Contributor

Description

Fixes an issue where Expo is unable to resolve the config plugin when following the installation instructions. The following error was thrown when trying to build with expo:

Failed to resolve plugin for module "@rnmapbox/maps" relative to "<PROJECT-PATH>"

The fix is based on this PR, fixing the same issue.

Checklist

  • I have tested this on a device/simulator for each compatible OS
  • I updated the documentation with running yarn generate in the root folder
  • I updated the typings files - if js interface was changed (index.d.ts)
  • I added/ updated a sample - if a new feature was implemented (/example)

@mfazekas
Copy link
Copy Markdown
Contributor

mfazekas commented Jan 4, 2023

@maartenweyns can you add steps to reproduce the issue? Thanks.

@maartenweyns
Copy link
Copy Markdown
Contributor Author

The most minimal setup that reproduces the issue:

  • Create blank react native app:
yarn create expo-app -t expo-template-blank-typescript TestApp
  • Install mapbox with expo (or yarn)
expo install rnmapbox/maps#main
  • Add expo to plugin array
{
  "expo": {
    "plugins": [
      [
        "@rnmapbox/maps",
        {
          "RNMapboxMapsImpl": "maplibre"
        }
      ]
    ]
  }
}
  • Run expo prebuild
expo prebuild

The following error is displayed:

CommandError: Failed to resolve plugin for module "@rnmapbox/maps" relative to "<PATH>"

@mfazekas mfazekas merged commit 439eeae into rnmapbox:main Jan 4, 2023
@maartenweyns
Copy link
Copy Markdown
Contributor Author

It looks like this file did not manage to make its way on npm? When I install this dependency with the #main version, the file is not there and I get the same expo error.

matthieugicquel pushed a commit to bamlab/react-native-app-security that referenced this pull request Dec 4, 2023
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

Successfully merging this pull request may close these issues.

2 participants