Plugins in custom-dev-client

Hi, so I created a custom dev client and it works fine. I installed a package that isn’t expo supported and it works out of the box. I tried adding a plugin in app.json but I get an error:

Package "@react-native-menu/menu" does not contain a valid config plugin.
Learn more: https://docs.expo.dev/guides/config-plugins/#creating-a-plugin

Cannot use import statement outside a module

If I remove the plugin, the app runs fine…
This is what my plugin looks like, thanks.
"plugins": ["@react-native-menu/menu"]

the library doesn’t have a config plugin, so you don’t need to add a plugin entry for it. it’ll work without any plugin apparently.

learn more about config plugins: Config Plugins - Expo Documentation

1 Like

Hi @kayode0x

As brents implies, not all packages that include native code actually require a config plugin.

@react-native-menu/menu looks like one that does not require a config plugin, except I see there’s a mention in the installation instructions about possibly having to change the version of Swift in the Xcode project. If that issue was affecting you, you would need to write your own config plugin to make those changes (or ask the developers of that package to write the config plugin).

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.