[ios.dangerous]: withIosDangerousBaseMod: Cannot find module './ios' when using expo-splash-screen plugin

SDK Version: 44
Platform: iOS and Android

Hello,

I’m trying to use the expo-splash-screen plugin to add a dark mode splash screen, but I receive the following error in the Prebuild process in EAS Build:

✖ Config sync failed
12
[stderr] [02:50:45] [ios.dangerous]: withIosDangerousBaseMod: Cannot find module './ios'
13
[stderr] Require stack:
14
[stderr] - /Users/expo/workingdir/build/node_modules/@expo/prebuild-config/node_modules/@expo/config-plugins/build/index.js
15
[stderr] - /Users/expo/workingdir/build/node_modules/@expo/prebuild-config/build/plugins/unversioned/expo-splash-screen/withAndroidSplashScreen.js
16
[stderr] - /Users/expo/workingdir/build/node_modules/expo-splash-screen/plugin/build/withSplashScreen.js
17
[stderr] - /Users/expo/workingdir/build/node_modules/expo-splash-screen/app.plugin.js
18
[stderr] - /usr/local/eas-build-worker/node_modules/@expo/config-plugins/build/utils/plugin-resolver.js
19
[stderr] - /usr/local/eas-build-worker/node_modules/@expo/config-plugins/build/plugins/withStaticPlugin.js
20
[stderr] - /usr/local/eas-build-worker/node_modules/@expo/config-plugins/build/plugins/withPlugins.js
21
[stderr] - /usr/local/eas-build-worker/node_modules/@expo/config-plugins/build/index.js
22
[stderr] - /usr/local/eas-build-worker/node_modules/@expo/config/build/plugins/withConfigPlugins.js
23
[stderr] - /usr/local/eas-build-worker/node_modules/@expo/config/build/Config.js
24
[stderr] - /usr/local/eas-build-worker/node_modules/@expo/config/build/index.js
25
[stderr] - /usr/local/eas-build-worker/node_modules/@expo/metro-config/build/ExpoMetroConfig.js
26
[stderr] - /usr/local/eas-build-worker/node_modules/expo-cli/build/exp.js
27
[stderr] - /usr/local/eas-build-worker/node_modules/expo-cli/bin/expo.js

I am building only for iOS at the moment, and I don’t understand why “withAndroidSplashScreen.js” is being imported instead of “withIosSplashScreen.js”

(I’m following the tip of Brent Vatne about using the plugin to add the dark version of the splash screen - Dark Mode Splash Screen | Voters | Expo)

Has someone been successful in adding it or has any suggestion?

Thank you very much.

Probably related to [ios.dangerous]: withIosDangerousBaseMod: Cannot find module 'chalk' · Issue #1034 · expo/eas-cli · GitHub
try rerunning that build

Hello @wkozyra, I’ve runned again the build and this time succeeded, but unfortunately the splash screen is empty (a white background, for both light and dark themes).

Is this the proper way the use the config plugin?

{
"plugins": [
      [
        "expo-splash-screen",
        {
          "splash": {
            "image": "./assets/splash-light.png",
            "resizeMode": "cover",
            "backgroundColor": "#FFFFFF",
            "dark": {
              "image": "./assets/splash-dark.png",
              "resizeMode": "cover",
              "backgroundColor": "#000000"
            }
          }
        }
      ]
    ],
    "splash": {
      "image": "./assets/splash-dark.png",
      "resizeMode": "cover",
      "backgroundColor": "#000000"
    },
}

I’ve tried to remove the default splash key, but the result is the same.

Thank you very much.

EDIT: Removing the splash key results in the white background splash screen, with the key, I just see the settings configured in the splash key.
The config plugin doesn’t seem to do anything.

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