Skip to content

PluginError: Cannot find module '@expo/config-plugins' on prebuild #1050

Description

@finleyaa

Bug report

Summary

When using the package with Expo SDK 56, it seems that the Expo CLI runs into an issue with @expo/config-plugins. The package is not hoisted to the project root node_modules, so module resolution fails.

Related: react-native-maps/react-native-maps#5927 (comment)

Steps to reproduce

  1. Create an Expo SDK 56 project (or upgrade an existing one)
  2. Install datetimepicker: npx expo install @react-native-community/datetimepicker
  3. Enable the config plugin in app.config.ts
  4. Run npx expo prebuild and get error:
PluginError: Cannot find module '@expo/config-plugins'
Require stack:
- node_modules/@react-native-community/datetimepicker/plugin/build/withDateTimePickerStyles.js
- node_modules/@react-native-community/datetimepicker/app.plugin.js
- node_modules/expo/node_modules/@expo/require-utils/build/load.js
- node_modules/expo/node_modules/@expo/require-utils/build/index.js
- node_modules/expo/node_modules/@expo/config/build/Config.js
- node_modules/expo/node_modules/@expo/config/build/index.js
- node_modules/expo/node_modules/@expo/cli/build/src/start/detectDevClient.js
- node_modules/expo/node_modules/@expo/cli/build/src/start/resolveOptions.js

Describe what you expected to happen:

Prebuild should succeed without requiring @expo/config-plugins as a direct project dependency.

Environment info

Using Expo SDK 56.0.15

npx react-native info output:

info Fetching system and libraries information...
System:
  OS: macOS 26.5.1
  CPU: (12) arm64 Apple M3 Pro
  Memory: 70.75 MB / 18.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 24.18.0
    path: ~/.nvm/versions/node/v24.18.0/bin/node
  Yarn:
    version: 1.22.22
    path: /opt/homebrew/bin/yarn
  npm:
    version: 11.16.0
    path: ~/.nvm/versions/node/v24.18.0/bin/npm
  Watchman:
    version: 2025.08.04.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.16.2
    path: /opt/homebrew/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 25.2
      - iOS 26.2
      - macOS 26.2
      - tvOS 26.2
      - visionOS 26.2
      - watchOS 26.2
  Android SDK: Not Found
IDEs:
  Android Studio: 2025.3 AI-253.29346.138.2531.14876573
  Xcode:
    version: 26.3/17C529
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.16
    path: /usr/bin/javac
  Ruby:
    version: 4.0.5
    path: /opt/homebrew/opt/ruby/bin/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 20.0.0
    wanted: ^20.0.0
  react:
    installed: 19.2.3
    wanted: 19.2.3
  react-native:
    installed: 0.85.3
    wanted: 0.85.3
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: Not found
  newArchEnabled: Not found
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

info React Native v0.86.0 is now available (your project is running on v0.85.3).
info Changelog: https://github.com/facebook/react-native/releases/tag/v0.86.0
info Diff: https://react-native-community.github.io/upgrade-helper/?from=0.85.3&to=0.86.0
info For more info, check out "https://reactnative.dev/docs/upgrading?os=macos".

datetimepicker version: 9.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions