Config plugin fails on Expo SDK 56: Cannot find module '@expo/config-plugins/build/plugins/ios-plugins'
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- react-native, typescript
- Domain
- build-system, mobile
Research direction
Start with plugin/src/ios.ts and plugin/src/android.ts, then inspect the built plugin files named in the error to trace the failing config-plugin imports. Run the Expo SDK 56 reproduction with npx expo prebuild --clean and verify that prebuild succeeds without adding @expo/config-plugins as a direct dependency.
Written by the indexing model from the issue text.
Description
Summary
When using the built-in Expo config plugin with Expo SDK 56, npx expo prebuild fails because the plugin imports from @expo/config-plugins internal paths directly. The package is not hoisted to the project root node_modules, so module resolution fails.
Reproducible sample code
npx expo prebuild --clean
Steps to reproduce
- Create an Expo SDK 56 project (or upgrade an existing one)
- Install react-native-maps:
npx expo install react-native-maps
- Enable the config plugin in
app.config.ts:
import type { ExpoConfig } from 'expo/config';
export default (): ExpoConfig => ({
name: 'repro',
slug: 'repro',
plugins: [
[
'react-native-maps',
{
androidGoogleMapsApiKey: 'test-key',
},
],
],
});
- Run:
npx expo prebuild --clean
Expected result
Prebuild should succeed without requiring @expo/config-plugins as a direct project dependency.
Actual result
Prebuild fails immediately with:
PluginError: Cannot find module '@expo/config-plugins/build/plugins/ios-plugins'
Require stack:
- node_modules/react-native-maps/plugin/build/ios.js
- node_modules/react-native-maps/plugin/build/index.js
- node_modules/react-native-maps/app.plugin.js
React Native Maps Version
1.27.2
What platforms are you seeing the problem on?
Android, iOS (Google Maps)
React Native Version
0.85.3
What version of Expo are you using?
SDK 56
Device(s)
prebuild (Android/iOS)
Additional information
Root cause
The config plugin still uses the legacy import style:
require("@expo/config-plugins/build/plugins/ios-plugins");
require("@expo/config-plugins/build/utils/generateCode");
Since Expo SDK 47, Expo recommends importing from expo/config-plugins instead of @expo/config-plugins directly (SDK 47 blog post). In SDK 56, @expo/config-plugins is nested under expo/node_modules and is not hoisted, so react-native-maps cannot resolve it from its plugin code.
Official Expo modules (e.g. expo-sqlite) already use the new pattern:
import { ConfigPlugin, withGradleProperties } from 'expo/config-plugins';
The same pattern in plugin/src/ios.ts and plugin/src/android.ts would resolve the issue.
Current workaround
Add @expo/config-plugins as a direct dependency:
npx expo install @expo/config-plugins
- Dominant language
- TypeScript
- Stars
- 16k
- Forks
- 5k
- Avg merge
- 17h 45m
- Merged PRs (30d)
- 2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from react-native-maps/react-native-maps
-
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
react-native-maps/react-native-maps#5987 · 1 comment ·
All issues in react-native-maps/react-native-maps
Similar issues
-
VerificationGate: ATTRIBUTION quote guard never matches a normal quotation (\b around the quote) Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
danielmiessler/LifeOS#2234 ·
-
T: Bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
Mend: dependency security vulnerability untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 70/100