eas build -> Cannot find module './utils' in read app config

Hello, as I say, why ? this is my first time with eas build.

Cannot find module './utils'
Require stack:
- /build/workingdir/build/node_modules/jsonfile/index.js
- /build/workingdir/build/node_modules/fs-extra/lib/json/jsonfile.js
- /build/workingdir/build/node_modules/fs-extra/lib/json/index.js
- /build/workingdir/build/node_modules/fs-extra/lib/index.js
- /build/workingdir/build/node_modules/@expo/image-utils/build/Cache.js
- /build/workingdir/build/node_modules/@expo/image-utils/build/index.js
- /build/workingdir/build/node_modules/expo-notifications/plugin/build/withNotificationsAndroid.js
- /build/workingdir/build/node_modules/expo-notifications/plugin/build/withNotifications.js
- /build/workingdir/build/node_modules/expo-notifications/app.plugin.js
- /build/node_modules/@expo/build-tools/node_modules/@expo/config-plugins/build/utils/plugin-resolver.js
- /build/node_modules/@expo/build-tools/node_modules/@expo/config-plugins/build/plugins/withStaticPlugin.js
- /build/node_modules/@expo/build-tools/node_modules/@expo/config-plugins/build/plugins/withPlugins.js
- /build/node_modules/@expo/build-tools/node_modules/@expo/config-plugins/build/index.js
- /build/node_modules/@expo/build-tools/dist/builders/android.js
- /build/node_modules/@expo/build-tools/dist/builders/index.js
- /build/node_modules/@expo/build-tools/dist/index.js
- /build/dist/ios/build.js
- /build/dist/build.js
- /build/dist/service.js
- /build/dist/ws.js
- /build/dist/main.js

you would have to share your app.config.js for us to understand why. you are likely importing something that doesn’t exist in your project in git

please share your app.config.js and a link to your build details page

app.json:

{
  "expo": {
    "owner": "the_doctor_web_srl",
    "privacy": "unlisted",
    "name": "xxxx",
    "slug": "xxxx",
    "version": "1.0.87",
    "orientation": "portrait",
    "icon": "./src/assets/icon.png",
    "scheme": "xxxx",
    "primaryColor": "#0b967a",
    "splash": {
      "image": "./src/assets/splash.png",
      "resizeMode": "contain",
      "backgroundColor": "#ffffff"
    },
    "updates": {
      "fallbackToCacheTimeout": 0
    },
    "assetBundlePatterns": [
      "**/*"
    ],
    "ios": {
      "usesAppleSignIn": true,
      "supportsTablet": false,
      "backgroundColor": "#ffffff",
      "bundleIdentifier": "com.thedoctorweb.xxxx",
      "buildNumber": "1.0.87",
      "infoPlist": {
        "CFBundleAllowMixedLocalizations": true,
        "CFBundleDevelopmentRegion": "it",
        "LSApplicationQueriesSchemes": ["message", "readdle-spark", "airmail", "ms-outlook", "googlegmail", "inbox-gmail", "ymail", "superhuman"],
      }
    },
    "locales": {
      "it": "./languages/ios/italiano.json",
      "en": "./languages/ios/inglese.json",
      "fr": "./languages/ios/francese.json",
      "es": "./languages/ios/spagnolo.json",
      "de": "./languages/ios/tedesco.json",
      "pt": "./languages/ios/portoghese.json",
      "ro": "./languages/ios/rumeno.json"
    },
    "android": {
      "googleServicesFile": "./google-services.json",
      "softwareKeyboardLayoutMode": "pan",
      "package": "com.thedoctorweb.xxxx",
      "versionCode": 87,
      "backgroundColor": "#ffffff",
      "config": {
        "googleSignIn": {
          "apiKey": "xxxxx",
          "certificateHash": "xxxx"
        }
      },
      "adaptiveIcon": {
        "foregroundImage": "./src/assets/adaptive-icon.png",
        "backgroundColor": "#ffffff"
      }
    },
    "androidStatusBar": {
      "backgroundColor": "#ffffff",
      "translucent": true
    },
    "androidNavigationBar": {
      "backgroundColor": "#00a100",
      "barStyle": "dark-content"
    }
  }
}

app.config

export default ({ config }) => {
  return {
    ...config,
    plugins: [
      ['expo-camera'],
      [
        'expo-notifications',
        {
          icon: './src/assets/notificationIcon.png',
          color: '#ffffff',
          mode: 'production',
        },
      ],
    ],
  };
};

Spin up build environment

Creating new worker instance
Connecting to the worker
Sending job to worker
Using image "ubuntu-18.04-android-30-ndk-r19c" based on "ubuntu:bionic-20201119"
Installed software:
- NDK 19.2.5345600
- Node.js 14.15.1
- Yarn 1.22.10
  NVM_DIR=/root/.nvm
  ANDROID_HOME=/opt/android
  HOSTNAME=turtle-worker-7d6e47cdc1
  JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
  ANDROID_SDK_HOME=/opt/android
  PWD=/build
  HOME=/root
  ANDROID_NDK_HOME=/opt/android/ndk/19.2.5345600
  NVM_BIN=/root/.nvm/versions/node/v14.15.1/bin
  SHLVL=1
  PATH=/root/.nvm/versions/node/v14.15.1/bin:/opt/android/ndk/19.2.5345600:/opt/android/tools:/opt/android/tools/bin:/opt/android/platform-tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
  NVM_INC=/root/.nvm/versions/node/v14.15.1/include/node
  _=/root/.nvm/versions/node/v14.15.1/bin/node
  CI=1
  EAS_BUILD=true
  NPM_CACHE_URL=http://npm-cache-service.production.svc.cluster.local:4873
  EAS_BUILD_NPM_CACHE_URL=http://npm-cache-service.production.svc.cluster.local:4873
  EAS_BUILD_PROFILE=release
  EAS_BUILD_GIT_COMMIT_HASH=6bdef927e28beee5984abef572248bf44c7c5d8b
  EAS_BUILD_ID=90ce3a66-0693-480c-9c36-66f6ae2758d1
  GRADLE_OPTS=-Dorg.gradle.jvmargs="-Xmx14g -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8" -Dorg.gradle.parallel=true -Dorg.gradle.daemon=false
  EAS_BUILD_USERNAME=thedoctorweb
Builder is ready, starting build

Install custom tools

Installing node v14.17.0
Downloading and installing node v14.17.0...
[stderr]
Downloading https://nodejs.org/dist/v14.17.0/node-v14.17.0-linux-x64.tar.xz...
[stderr]
[stderr]
0.4%
[stderr]
######################                                                    30.6%
[stderr]
######################################################################## 100.0%
[stderr]
Computing checksum with sha256sum
[stderr]
Checksums matched!
Now using node v14.17.0 (npm v6.14.13)
/root/.nvm/versions/node/v14.15.1/bin/sharp -> /root/.nvm/versions/node/v14.15.1/lib/node_modules/sharp-cli/bin/cli.js
+ sharp-cli@1.15.0
updated 10 packages in 14.539s
Installing yarn@1.22.10
> yarn@1.22.10 preinstall /root/.nvm/versions/node/v14.15.1/lib/node_modules/yarn
> :; (node ./preinstall.js > /dev/null 2>&1 || true)
/root/.nvm/versions/node/v14.15.1/bin/yarn -> /root/.nvm/versions/node/v14.15.1/lib/node_modules/yarn/bin/yarn.js
/root/.nvm/versions/node/v14.15.1/bin/yarnpkg -> /root/.nvm/versions/node/v14.15.1/lib/node_modules/yarn/bin/yarn.js
+ yarn@1.22.10
updated 1 package in 0.567s
Installing Expo CLI 4.12.0
[stderr]
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
[stderr]
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
[stderr]
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
[stderr]
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
[stderr]
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
[stderr]
npm
[stderr]
[stderr]
WARN
[stderr]
[stderr]
deprecated
[stderr]
querystring@0.2.0: The
[stderr]
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
[stderr]
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
[stderr]
npm
[stderr]
WARN deprecated uuid@3.0.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
/root/.nvm/versions/node/v14.17.0/bin/expo -> /root/.nvm/versions/node/v14.17.0/lib/node_modules/expo-cli/bin/expo.js
/root/.nvm/versions/node/v14.17.0/bin/expo-cli -> /root/.nvm/versions/node/v14.17.0/lib/node_modules/expo-cli/bin/expo.js
[stderr]
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.2 (node_modules/expo-cli/node_modules/chokidar/node_modules/fsevents):
[stderr]
npm WARN
[stderr]
notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
[stderr]
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/expo-cli/node_modules/watchpack-chokidar2/node_modules/chokidar/node_modules/fsevents):
[stderr]
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
[stderr]
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/expo-cli/node_modules/webpack-dev-server/node_modules/chokidar/node_modules/fsevents):
[stderr]
npm WARN
[stderr]
notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
[stderr]
+ expo-cli@4.12.0
added 1649 packages from 751 contributors in 85.828s

Install dependencies

Running yarn in the root dir of your repository 
yarn install v1.22.10
[1/4] Resolving packages...
success Already up-to-date.
Done in 0.79s.

Read app config

Cannot find module './utils'
Require stack:
- /build/workingdir/build/node_modules/jsonfile/index.js
- /build/workingdir/build/node_modules/fs-extra/lib/json/jsonfile.js
- /build/workingdir/build/node_modules/fs-extra/lib/json/index.js
- /build/workingdir/build/node_modules/fs-extra/lib/index.js
- /build/workingdir/build/node_modules/@expo/image-utils/build/Cache.js
- /build/workingdir/build/node_modules/@expo/image-utils/build/index.js
- /build/workingdir/build/node_modules/expo-notifications/plugin/build/withNotificationsAndroid.js
- /build/workingdir/build/node_modules/expo-notifications/plugin/build/withNotifications.js
- /build/workingdir/build/node_modules/expo-notifications/app.plugin.js
- /build/node_modules/@expo/build-tools/node_modules/@expo/config-plugins/build/utils/plugin-resolver.js
- /build/node_modules/@expo/build-tools/node_modules/@expo/config-plugins/build/plugins/withStaticPlugin.js
- /build/node_modules/@expo/build-tools/node_modules/@expo/config-plugins/build/plugins/withPlugins.js
- /build/node_modules/@expo/build-tools/node_modules/@expo/config-plugins/build/index.js
- /build/node_modules/@expo/build-tools/dist/builders/android.js
- /build/node_modules/@expo/build-tools/dist/builders/index.js
- /build/node_modules/@expo/build-tools/dist/index.js
- /build/dist/ios/build.js
- /build/dist/build.js
- /build/dist/service.js
- /build/dist/ws.js
- /build/dist/main.js

this is my .gitignore

# Expo
.expo
__generated__
web-build

# macOS
.DS_Store

# Node
node_modules
npm-debug.log
yarn-error.log

# Ruby
.direnv

# Env
.envrc.local

# Emacs
*~

# Vim
.*.swp
.*.swo
.*.swn
.*.swm

# Sublime Text
*.sublime-project
*.sublime-workspace

# Xcode
*.pbxuser
!default.pbxuser
*.xccheckout
*.xcscmblueprint
xcuserdata

# IDEA / Android Studio
*.iml
.gradle
.idea

# Eclipse
.project
.settings

# VSCode
.history/

# Android
*.apk
*.hprof
/android/**/build
/android/**/.cxx
/android/**/local.properties
/android/captures
/android/expoview/libs/ReactAndroid-temp
/android/versioned-react-native/ReactAndroid
ReactAndroid-temp.aar

# Tools
jarjar-rules.txt

# Dynamic Macros
/ios/Exponent/Supporting/EXBuildConstants.plist.bak
/ios/Exponent/Supporting/EXBuildConstants.plist.json
/ios/Exponent/Supporting/EXBuildConstants.plist
/ios/Exponent/Supporting/GoogleService-Info.plist
/ios/Exponent/Supporting/Info.plist.bak
/ios/Exponent/Supporting/Info.plist.json
/android/expoview/src/main/java/host/exp/exponent/generated/ExponentBuildConstants.java
/android/app/src/androidTest/java/host/exp/exponent/generated/TestBuildConstants.java
.kernel-ngrok-url

# Template files
/android/app/src/main/AndroidManifest.xml
/android/app/google-services.json
/android/expoview/src/main/java/host/exp/exponent/generated/ExponentKeys.java
/apps/bare-expo/android/app/google-services.json
/apps/bare-expo/ios/BareExpo/GoogleService-Info.plist
/ios/Exponent/Generated/EXKeys.h
/ios/ExponentIntegrationTests/EXTestEnvironment.plist
/exponent-view-template/ios/Podfile

# Template projects
templates/**/android/**/generated/*
templates/**/android/app/build
templates/**/Pods/**

# Codemod
.codemod.bookmark

# Fastlane
/*.cer
/fastlane/report.xml
/fastlane/Preview.html
/fastlane/Deployment
/Preview.html
/gc_keys.json
/fastlane/gc_keys.json

# CI
/android/logcat.txt

# Shell apps
android-shell-app
shellAppBase-*
shellAppIntermediates
shellAppWorkspaces
/artifacts/*

# Expo Client builds
/client-builds

# Expo web env
.env.local
.env.development.local
.env.test.local
.env.production.local
apps/bare-expo/deploy-url.txt

# Expo Doc merging
docs/pages/versions/*/react-native/ADDED_*.md
docs/pages/versions/*/react-native/REMOVED_*.md
docs/pages/versions/*/react-native/*.diff

# Home
/home/dist

# Prebuilds
/packages/**/*.xcframework
/packages/**/*.spec.json
/packages/**/Info-generated.plist

# Pods
/ios/Pods

it looks like this error is coming from the expo-notifications config plugin. you’re currently using sdk 41, which was the first version where we had experimental support for managed apps on eas build. i’d advise you to upgrade to sdk 42, we made a lot of improvements and this will resolve your particular issue.

Thank you, if I remove expo-notifications, error go away. I will upgrade to expo sdk 42.

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