New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ios.dangerous]: withIosDangerousBaseMod: Cannot find module 'chalk' #1034
Comments
I can confirm this issue. This seem to occur for iOS as well as Android. Two days ago I was able to build the same app without any issues. Running eas build with '--clear-cache' doesn't make a difference. |
Yes, I got into the problem with both iOS and Android. |
Same here. Was able to build a few days ago and I am suddenly getting this error. Android gets the same error: "withAndroidDangerousBaseMod: Cannot find module 'chalk'" EDIT: "npm i chalk" actually fixed this |
@RoccoDocco Did you added chalk in project dependencies? If yes, it might fix this error but it shouldn't be the solution. I, honestly, don't want any unknown package in my project dependency list. Expo team should have another solution. |
@RoccoDocco thanks, this workaround seems to be fixing the issue for now. @innonguyen I've added chalk to my project dependencies before building using 'eas build'. At first I got some errors about chalk being 'esm only': 'Must use import to load ES Module'. So I had to install chalk 4.1.2 (npm install chalk@4.1.2) after which everything worked again for me. Still I don't like adding packages to my project that I don't use myself, so I'm looking forward to a solution on this issue. |
@innonguyen I copied the content of your package.json (dependencies + devDependencies) and I couldn't reproduce the issue, plus I noticed that you have very old eas-cli in your dev dependencies(I don't expect for that to be the issue, but if you are using it then you might face some problems) I couldn't reproduce that exact error, but it looks like if you are using npm, the install step was using npm, but prebuild was running yarn which might be a reason for that issue. Fix for that was deployed, so please rerun your builds to check if the issue is resolved. |
Firstly, the eas-cli version in devDependencies is not what i'm using. I run this command and it showed like this
Secondly, I used yarn for entire process. I think the problem comes from your build process updates while other people are getting into the same issue with me. And we are all had no issue 2 days before. You should rollback your build process. |
No, both your current builds and old ones (from few days back are using npm). Note that if you are not committing your yarn.lock, it wont be uploaded to eas(it always worked this way)
I'm assuming that changes that were just deployed will fix the issue, if not please post here. |
@wkozyra95 For me those changes you mentioned fixed the issue. I was using npm but the prebuild on eas was using yarn (and was complaining about that). This warning is gone now and I get no error for chalk anymore. Thank you very much! |
@KWcDP6hz3 How to force prebuild using yarn? |
@innonguyen eas build will use yarn if you have yarn.lock in the repo |
I confirmed this issue resolved by doing these following steps: Option 1: Option 2: |
Build/Submit details page URL
https://expo.dev/accounts/pavnlimitedcompany/projects/tlcn/builds/2b41f7c0-29c4-4313-a450-f38396465b2e
Summary
2 days ago, I built with eas build successfully. However, I got the below error for today's build
[PREBUILD] ✖ Config sync failed [PREBUILD] [13:29:06] [ios.dangerous]: withIosDangerousBaseMod: Cannot find module 'chalk'
I don't change anything in my source code. I think it's a build process bug.
Managed or bare?
Managed
Environment
expo-env-info 1.0.2 environment info:
System:
OS: macOS 11.6.4
Shell: 5.8 - /bin/zsh
Binaries:
Node: 14.16.0 - ~/.nvm/versions/node/v14.16.0/bin/node
Yarn: 1.22.17 - ~/.yarn/bin/yarn
npm: 6.14.11 - ~/.nvm/versions/node/v14.16.0/bin/npm
Watchman: 2021.09.13.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.10.1 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 15.0, DriverKit 20.4, macOS 11.3, tvOS 15.0, watchOS 8.0
IDEs:
Android Studio: 2020.3 AI-203.7717.56.2031.7784292
Xcode: 13.0/13A233 - /usr/bin/xcodebuild
npmPackages:
expo: ^43.0.0 => 44.0.6
react: 17.0.1 => 17.0.1
react-dom: 17.0.1 => 17.0.1
react-native: 0.64.3 => 0.64.3
react-native-web: 0.17.1 => 0.17.1
npmGlobalPackages:
eas-cli: 0.48.2
expo-cli: 5.3.0
Expo Workflow: managed
Error output
[PREBUILD] - Config syncing
[PREBUILD] ✖ Config sync failed
[PREBUILD] [13:29:06] [ios.dangerous]: withIosDangerousBaseMod: Cannot find module 'chalk'
[PREBUILD] Require stack:
[PREBUILD] - /private/var/folders/bk/2p_w9p8j3ys3f786dc6t94dw0000gp/T/eas-build-local-nodejs/ac25c6d9-c55c-4706-b947-85b48c0f49bb/build/node_modules/@expo/image-utils/build/Image.js
[PREBUILD] - /private/var/folders/bk/2p_w9p8j3ys3f786dc6t94dw0000gp/T/eas-build-local-nodejs/ac25c6d9-c55c-4706-b947-85b48c0f49bb/build/node_modules/@expo/image-utils/build/index.js
[PREBUILD] - /private/var/folders/bk/2p_w9p8j3ys3f786dc6t94dw0000gp/T/eas-build-local-nodejs/ac25c6d9-c55c-4706-b947-85b48c0f49bb/build/node_modules/expo-splash-screen/node_modules/@expo/prebuild-config/build/plugins/unversioned/expo-splash-screen/withIosSplashAssets.js
[PREBUILD] - /private/var/folders/bk/2p_w9p8j3ys3f786dc6t94dw0000gp/T/eas-build-local-nodejs/ac25c6d9-c55c-4706-b947-85b48c0f49bb/build/node_modules/expo-splash-screen/node_modules/@expo/prebuild-config/build/plugins/unversioned/expo-splash-screen/withIosSplashScreen.js
[PREBUILD] - /private/var/folders/bk/2p_w9p8j3ys3f786dc6t94dw0000gp/T/eas-build-local-nodejs/ac25c6d9-c55c-4706-b947-85b48c0f49bb/build/node_modules/expo-splash-screen/plugin/build/withSplashScreen.js
[PREBUILD] - /private/var/folders/bk/2p_w9p8j3ys3f786dc6t94dw0000gp/T/eas-build-local-nodejs/ac25c6d9-c55c-4706-b947-85b48c0f49bb/build/node_modules/expo-splash-screen/app.plugin.js
[PREBUILD] - /Users/namanh/.npm/_npx/10554/lib/node_modules/eas-cli-local-build-plugin/node_modules/@expo/prebuild-config/node_modules/@expo/config-plugins/build/utils/plugin-resolver.js
[PREBUILD] - /Users/namanh/.npm/_npx/10554/lib/node_modules/eas-cli-local-build-plugin/node_modules/@expo/prebuild-config/node_modules/@expo/config-plugins/build/plugins/withStaticPlugin.js
[PREBUILD] - /Users/namanh/.npm/_npx/10554/lib/node_modules/eas-cli-local-build-plugin/node_modules/@expo/prebuild-config/node_modules/@expo/config-plugins/build/plugins/withPlugins.js
[PREBUILD] - /Users/namanh/.npm/_npx/10554/lib/node_modules/eas-cli-local-build-plugin/node_modules/@expo/prebuild-config/node_modules/@expo/config-plugins/build/index.js
[PREBUILD] - /Users/namanh/.npm/_npx/10554/lib/node_modules/eas-cli-local-build-plugin/node_modules/@expo/prebuild-config/node_modules/@expo/config/build/plugins/withConfigPlugins.js
[PREBUILD] - /Users/namanh/.npm/_npx/10554/lib/node_modules/eas-cli-local-build-plugin/node_modules/@expo/prebuild-config/node_modules/@expo/config/build/Config.js
[PREBUILD] - /Users/namanh/.npm/_npx/10554/lib/node_modules/eas-cli-local-build-plugin/node_modules/@expo/prebuild-config/node_modules/@expo/config/build/index.js
[PREBUILD] - /Users/namanh/.npm/_npx/10554/lib/node_modules/eas-cli-local-build-plugin/node_modules/@expo/prebuild-config/build/getPrebuildConfig.js
[PREBUILD] - /Users/namanh/.npm/_npx/10554/lib/node_modules/eas-cli-local-build-plugin/node_modules/@expo/prebuild-config/build/index.js
[PREBUILD] - /Users/namanh/.npm/_npx/10554/lib/node_modules/eas-cli-local-build-plugin/node_modules/expo-cli/build/commands/eject/configureProjectAsync.js
[PREBUILD] - /Users/namanh/.npm/_npx/10554/lib/node_modules/eas-cli-local-build-plugin/node_modules/expo-cli/build/commands/eject/prebuildAppAsync.js
[PREBUILD] - /Users/namanh/.npm/_npx/10554/lib/node_modules/eas-cli-local-build-plugin/node_modules/expo-cli/build/commands/eject/prebuildAsync.js
[PREBUILD] - /Users/namanh/.npm/_npx/10554/lib/node_modules/eas-cli-local-build-plugin/node_modules/expo-cli/build/commands/eject/prebuild.js
[PREBUILD] - /Users/namanh/.npm/_npx/10554/lib/node_modules/eas-cli-local-build-plugin/node_modules/expo-cli/build/commands/index.js
[PREBUILD] - /Users/namanh/.npm/_npx/10554/lib/node_modules/eas-cli-local-build-plugin/node_modules/expo-cli/build/exp.js
[PREBUILD] - /Users/namanh/.npm/_npx/10554/lib/node_modules/eas-cli-local-build-plugin/node_modules/expo-cli/bin/expo.js
[PREBUILD] [13:29:06] Error: [ios.dangerous]: withIosDangerousBaseMod: Cannot find module 'chalk'
[PREBUILD] Require stack:
[PREBUILD] - /private/var/folders/bk/2p_w9p8j3ys3f786dc6t94dw0000gp/T/eas-build-local-nodejs/ac25c6d9-c55c-4706-b947-85b48c0f49bb/build/node_modules/@expo/image-utils/build/Image.js
[PREBUILD] - /private/var/folders/bk/2p_w9p8j3ys3f786dc6t94dw0000gp/T/eas-build-local-nodejs/ac25c6d9-c55c-4706-b947-85b48c0f49bb/build/node_modules/@expo/image-utils/build/index.js
[PREBUILD] - /private/var/folders/bk/2p_w9p8j3ys3f786dc6t94dw0000gp/T/eas-build-local-nodejs/ac25c6d9-c55c-4706-b947-85b48c0f49bb/build/node_modules/expo-splash-screen/node_modules/@expo/prebuild-config/build/plugins/unversioned/expo-splash-screen/withIosSplashAssets.js
[PREBUILD] - /private/var/folders/bk/2p_w9p8j3ys3f786dc6t94dw0000gp/T/eas-build-local-nodejs/ac25c6d9-c55c-4706-b947-85b48c0f49bb/build/node_modules/expo-splash-screen/node_modules/@expo/prebuild-config/build/plugins/unversioned/expo-splash-screen/withIosSplashScreen.js
[PREBUILD] - /private/var/folders/bk/2p_w9p8j3ys3f786dc6t94dw0000gp/T/eas-build-local-nodejs/ac25c6d9-c55c-4706-b947-85b48c0f49bb/build/node_modules/expo-splash-screen/plugin/build/withSplashScreen.js
[PREBUILD] - /private/var/folders/bk/2p_w9p8j3ys3f786dc6t94dw0000gp/T/eas-build-local-nodejs/ac25c6d9-c55c-4706-b947-85b48c0f49bb/build/node_modules/expo-splash-screen/app.plugin.js
[PREBUILD] - /Users/namanh/.npm/_npx/10554/lib/node_modules/eas-cli-local-build-plugin/node_modules/@expo/prebuild-config/node_modules/@expo/config-plugins/build/utils/plugin-resolver.js
[PREBUILD] - /Users/namanh/.npm/_npx/10554/lib/node_modules/eas-cli-local-build-plugin/node_modules/@expo/prebuild-config/node_modules/@expo/config-plugins/build/plugins/withStaticPlugin.js
[PREBUILD] - /Users/namanh/.npm/_npx/10554/lib/node_modules/eas-cli-local-build-plugin/node_modules/@expo/prebuild-config/node_modules/@expo/config-plugins/build/plugins/withPlugins.js
[PREBUILD] - /Users/namanh/.npm/_npx/10554/lib/node_modules/eas-cli-local-build-plugin/node_modules/@expo/prebuild-config/node_modules/@expo/config-plugins/build/index.js
[PREBUILD] - /Users/namanh/.npm/_npx/10554/lib/node_modules/eas-cli-local-build-plugin/node_modules/@expo/prebuild-config/node_modules/@expo/config/build/plugins/withConfigPlugins.js
[PREBUILD] - /Users/namanh/.npm/_npx/10554/lib/node_modules/eas-cli-local-build-plugin/node_modules/@expo/prebuild-config/node_modules/@expo/config/build/Config.js
[PREBUILD] - /Users/namanh/.npm/_npx/10554/lib/node_modules/eas-cli-local-build-plugin/node_modules/@expo/prebuild-config/node_modules/@expo/config/build/index.js
[PREBUILD] - /Users/namanh/.npm/_npx/10554/lib/node_modules/eas-cli-local-build-plugin/node_modules/@expo/prebuild-config/build/getPrebuildConfig.js
[PREBUILD] - /Users/namanh/.npm/_npx/10554/lib/node_modules/eas-cli-local-build-plugin/node_modules/@expo/prebuild-config/build/index.js
[PREBUILD] - /Users/namanh/.npm/_npx/10554/lib/node_modules/eas-cli-local-build-plugin/node_modules/expo-cli/build/commands/eject/configureProjectAsync.js
[PREBUILD] - /Users/namanh/.npm/_npx/10554/lib/node_modules/eas-cli-local-build-plugin/node_modules/expo-cli/build/commands/eject/prebuildAppAsync.js
[PREBUILD] - /Users/namanh/.npm/_npx/10554/lib/node_modules/eas-cli-local-build-plugin/node_modules/expo-cli/build/commands/eject/prebuildAsync.js
[PREBUILD] - /Users/namanh/.npm/_npx/10554/lib/node_modules/eas-cli-local-build-plugin/node_modules/expo-cli/build/commands/eject/prebuild.js
[PREBUILD] - /Users/namanh/.npm/_npx/10554/lib/node_modules/eas-cli-local-build-plugin/node_modules/expo-cli/build/commands/index.js
[PREBUILD] - /Users/namanh/.npm/_npx/10554/lib/node_modules/eas-cli-local-build-plugin/node_modules/expo-cli/build/exp.js
[PREBUILD] - /Users/namanh/.npm/_npx/10554/lib/node_modules/eas-cli-local-build-plugin/node_modules/expo-cli/bin/expo.js
[PREBUILD] at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
[PREBUILD] at Function.Module._load (internal/modules/cjs/loader.js:725:27)
[PREBUILD] at Module.require (internal/modules/cjs/loader.js:952:19)
[PREBUILD] at require (internal/modules/cjs/helpers.js:88:18)
[PREBUILD] at Object. (/private/var/folders/bk/2p_w9p8j3ys3f786dc6t94dw0000gp/T/eas-build-local-nodejs/ac25c6d9-c55c-4706-b947-85b48c0f49bb/build/node_modules/@expo/image-utils/src/Image.ts:1:1)
[PREBUILD] at Module._compile (internal/modules/cjs/loader.js:1063:30)
[PREBUILD] at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
[PREBUILD] at Module.load (internal/modules/cjs/loader.js:928:32)
[PREBUILD] at Function.Module._load (internal/modules/cjs/loader.js:769:14)
[PREBUILD] at Module.require (internal/modules/cjs/loader.js:952:19)
[PREBUILD] at require (internal/modules/cjs/helpers.js:88:18)
[PREBUILD] at Object. (/private/var/folders/bk/2p_w9p8j3ys3f786dc6t94dw0000gp/T/eas-build-local-nodejs/ac25c6d9-c55c-4706-b947-85b48c0f49bb/build/node_modules/@expo/image-utils/src/index.ts:2:1)
[PREBUILD] at Module._compile (internal/modules/cjs/loader.js:1063:30)
[PREBUILD] at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
[PREBUILD] at Module.load (internal/modules/cjs/loader.js:928:32)
[PREBUILD] at Function.Module._load (internal/modules/cjs/loader.js:769:14)
[PREBUILD]
Error: bash exited with non-zero code: 1
at ChildProcess.completionListener (/Users/namanh/.npm/_npx/10554/lib/node_modules/eas-cli-local-build-plugin/node_modules/@expo/spawn-async/build/spawnAsync.js:43:23)
at Object.onceWrapper (events.js:422:26)
at ChildProcess.emit (events.js:315:20)
at maybeClose (internal/child_process.js:1048:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
...
at spawnAsync (/Users/namanh/.npm/_npx/10554/lib/node_modules/eas-cli-local-build-plugin/node_modules/@expo/spawn-async/build/spawnAsync.js:8:21)
at spawn (/Users/namanh/.npm/_npx/10554/lib/node_modules/eas-cli-local-build-plugin/node_modules/@expo/turtle-spawn/dist/index.js:17:47)
at LocalExpoCliEjectProvider.runEject (/Users/namanh/.npm/_npx/10554/lib/node_modules/eas-cli-local-build-plugin/dist/eject.js:22:42)
at /Users/namanh/.npm/_npx/10554/lib/node_modules/eas-cli-local-build-plugin/node_modules/@expo/build-tools/dist/builders/ios.js:32:41
at BuildContext.runBuildPhase (/Users/namanh/.npm/_npx/10554/lib/node_modules/eas-cli-local-build-plugin/node_modules/@expo/build-tools/dist/context.js:48:34)
at Object.iosBuilder (/Users/namanh/.npm/_npx/10554/lib/node_modules/eas-cli-local-build-plugin/node_modules/@expo/build-tools/dist/builders/ios.js:28:23)
at async buildIosAsync (/Users/namanh/.npm/_npx/10554/lib/node_modules/eas-cli-local-build-plugin/dist/ios.js:49:27)
at async buildAsync (/Users/namanh/.npm/_npx/10554/lib/node_modules/eas-cli-local-build-plugin/dist/build.js:28:32)
at async main (/Users/namanh/.npm/_npx/10554/lib/node_modules/eas-cli-local-build-plugin/dist/main.js:16:9)
[CLEAN_UP_CREDENTIALS] Destroying keychain - /var/folders/bk/2p_w9p8j3ys3f786dc6t94dw0000gp/T/turtle-v2-ca713dba-6dfe-4e88-98da-f096a763a0a9.keychain
[CLEAN_UP_CREDENTIALS] Removing provisioning profile
Build failed
bash exited with non-zero code: 1
Error: npx exited with non-zero code: 1
Reproducible demo or steps to reproduce from a blank project
Step 1: eas build --profile internal
Step 2: get the above error
The text was updated successfully, but these errors were encountered: