When doing an eas build, during the 'run gradlew' process, exponentindex.js cannot be found even though its in my app.

I am on expo sdk 45 currently, this being the first time eas has been integrated into my app. The current app works perfectly fine on a regular ‘expo start’ command, and builds during a development build of eas, but does not build properly when trying to use eas build to build for production. The dependencies was an issue, but it has been fixed and expo doctor runs perfect with no worries. Im not getting very clear errors in the ‘run gradlew’ command either, and iIcant figure out why it wont build.
Environment :

  • Bare workflow
  • Node 16.14.2
  • Expo SDK 45
  • eas-cli 2.0.0

I have tried:
removing and adding my node modules again
resetting the terminal im working in
fixing my current dependencies (Which allowed me to build on the development client)

My package json

{
  "scripts": {
    "start": "react-native start",
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "web": "expo start --web",
    "eject": "expo eject"
  },
  "dependencies": {
    "@expo/config-plugins": "^4.1.0",
    "@expo/ngrok": "^4.1.0",
    "@react-native-community/datetimepicker": "6.1.2",
    "@react-native-firebase/app": "^13.0.0",
    "@react-native-firebase/database": "13.1.1",
    "@react-native-masked-view/masked-view": "0.2.6",
    "@react-native-picker/picker": "2.4.0",
    "@react-navigation/bottom-tabs": "^5.11.2",
    "@react-navigation/material-top-tabs": "^5.3.10",
    "@react-navigation/native": "^5.8.10",
    "@react-navigation/stack": "^5.12.8",
    "babel-plugin-transform-remove-console": "^6.9.4",

    "expo": "^45.0.0",
    "expo-app-loading": "~2.0.0",
    "expo-av": "~11.2.3",
    "expo-build-properties": "~0.2.0",
    "expo-camera": "~12.2.0",
    "expo-checkbox": "~2.1.0",
    "expo-cli": "^6.1.0",
    "expo-clipboard": "~3.0.1",
    "expo-dev-client": "~1.0.1",
    "expo-device": "~4.2.0",
    "expo-document-picker": "~10.2.1",
    "expo-font": "~10.1.0",
    "expo-image-manipulator": "~10.3.1",
    "expo-image-picker": "~13.1.1",
    "expo-linking": "~3.1.0",
    "expo-notifications": "~0.15.4",
    "expo-random": "~12.2.0",
    "expo-secure-store": "~11.2.0",
    "expo-status-bar": "~1.3.0",
    "expo-updates": "~0.13.4",
    "expo-web-browser": "~10.2.1",
    "firebase": "8.2.3",
    "install": "^0.13.0",
    "lodash": "^4.17.21",
    "moment": "^2.29.1",
    "prop-types": "^15.7.0",
    "react": "17.0.2",
    "react-devtools": "^3.6.3",
    "react-dom": "17.0.2",
    "react-moment": "^1.1.1",
    "react-native": "0.68.2",
    "react-native-autoheight-webview": "^1.5.7",
    "react-native-badge-avatar": "^1.1.2",
    "react-native-check-box": "^2.1.7",
    "react-native-date-picker": "^3.2.9",
    "react-native-date-picker-fork": "^0.0.2",
    "react-native-dropdown-picker": "^3.7.8",
    "react-native-elements": "^3.1.0",
    "react-native-extended-stylesheet": "^0.12.0",
    "react-native-flash-message": "^0.2.1",
    "react-native-gesture-handler": "~2.2.1",
    "react-native-gifted-chat": "^0.16.3",
    "react-native-image-crop-picker": "^0.35.2",
    "react-native-keyboard-spacer": "^0.4.1",
    "react-native-material-date-picker": "^1.0.0",
    "react-native-modal": "^11.6.1",
    "react-native-modal-datetime-picker": "^9.1.0",
    "react-native-paper": "^4.12.5",
    "react-native-picker-select": "^8.0.4",
    "react-native-reanimated": "~2.8.0",
    "react-native-safe-area-context": "4.2.4",
    "react-native-screens": "~3.11.1",
    "react-native-select-two": "^1.1.0",
    "react-native-swipe-list-view": "^3.2.9",
    "react-native-tab-view": "^2.15.2",
    "react-native-tracking-transparency": "^0.1.0",
    "react-native-vector-icons": "^7.0.0",
    "react-native-web": "0.17.7",
    "react-native-webview": "11.18.1",
    "react-redux": "^7.2.6",
    "use-redux-states": "^1.0.2",
    "validator": "^13.7.0"
  },
  "devDependencies": {
    "eas-cli": "2.0.0",
    "@babel/core": "^7.13.0",
    "@babel/runtime": "^7.8.4",
    "@react-native-community/eslint-config": "^1.1.0",
    "babel-jest": "^25.1.0",
    "babel-preset-expo": "8.3.0",
    "eslint": "^6.5.1",
    "jest": "^25.1.0",
    "metro-react-native-babel-preset": "^0.59.0"
  },
  "jest": {
    "preset": "react-native"
  },
  "private": true,
  "name": "Gradstar_App",
  "version": "4"
}

my Eas.json

{
  "cli": {
    "version": ">= 2.0.0"
  },
  "build" : {
    "development": {
      "developmentClient": true,
      "distribution": "internal"   
  },
  "preview": {
    "distribution" : "internal"
  },
  "production": {}
   },
  "submit": {
    "production": {
      "android": {
        "serviceAccountKeyPath": "xxxxx",
        "track": "internal",
        "changesNotSentForReview":false
      },
      "ios": {
        "appleId": "xxxxxx",
        "ascAppId": "xxxxx",
        "appleTeamId": "xxxxxx"
      }
    }
  }
}

Gradle error :

Running 'gradlew :app:bundleRelease' in /home/expo/workingdir/build/android
  - Gradle detected a problem with the following location: '/home/expo/workingdir/build'. Reason: Task ':app:bundleReleaseJsAndAssets' uses this output of task ':expo-application:compileReleaseShaders' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.3.3/userguide/validation_problems.html#implicit_dependency for more details about this problem.
283  - Gradle detected a problem with the following location: '/home/expo/workingdir/build'. Reason: Task ':app:bundleReleaseJsAndAssets' uses this output of task ':expo-application:mergeReleaseShaders' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.3.3/userguide/validation_problems.html#implicit_dependency for more details about this problem.
284  - Gradle detected a problem with the following location: '/home/expo/workingdir/build'. Reason: Task ':app:bundleReleaseJsAndAssets' uses this output of task ':expo-application:packageReleaseAssets' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.3.3/userguide/validation_problems.html#implicit_dependency for more details about this problem.
285  - Gradle detected a problem with the following location: '/home/expo/workingdir/build'. Reason: Task ':app:bundleReleaseJsAndAssets' uses this output of task ':expo-av:compileReleaseShaders' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.3.3/userguide/validation_problems.html#implicit_dependency for more details about this problem.
286  - Gradle detected a problem with the following location: '/home/expo/workingdir/build'. Reason: Task ':app:bundleReleaseJsAndAssets' uses this output of task ':expo-av:mergeReleaseShaders' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.3.3/userguide/validation_problems.html#implicit_dependency for more details about this problem.
287  - Gradle detected a problem with the following location: '/home/expo/workingdir/build'. Reason: Task ':app:bundleReleaseJsAndAssets' uses this output of task ':expo-av:packageReleaseAssets' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.3.3/userguide/validation_problems.html#implicit_dependency for more details about this problem.
288  - Gradle detected a problem with the following location: '/home/expo/workingdir/build'. Reason: Task ':app:bundleReleaseJsAndAssets' uses this output of task ':expo-camera:compileReleaseShaders' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.3.3/userguide/validation_problems.html#implicit_dependency for more details about this problem.
289  - Gradle detected a problem with the following location: '/home/expo/workingdir/build'. Reason: Task ':app:bundleReleaseJsAndAssets' uses this output of task ':expo-camera:mergeReleaseShaders' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.3.3/userguide/validation_problems.html#implicit_dependency for more details about this problem.
290  - Gradle detected a problem with the following location: '/home/expo/workingdir/build'. Reason: Task ':app:bundleReleaseJsAndAssets' uses this output of task ':expo-camera:packageReleaseAssets' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.3.3/userguide/validation_problems.html#implicit_dependency for more details about this problem.
291  - Gradle detected a problem with the following location: '/home/expo/workingdir/build'. Reason: Task ':app:bundleReleaseJsAndAssets' uses this output of task ':expo-clipboard:compileReleaseShaders' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.3.3/userguide/validation_problems.html#implicit_dependency for more details about this problem.
292  - Gradle detected a problem with the following location: '/home/expo/workingdir/build'. Reason: Task ':app:bundleReleaseJsAndAssets' uses this output of task ':expo-clipboard:mergeReleaseShaders' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.3.3/userguide/validation_problems.html#implicit_dependency for more details about this problem.
293  - Gradle detected a problem with the following location: '/home/expo/workingdir/build'. Reason: Task ':app:bundleReleaseJsAndAssets' uses this output of task ':expo-clipboard:packageReleaseAssets' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.3.3/userguide/validation_problems.html#implicit_dependency for more details about this problem.
294  - Gradle detected a problem with the following location: '/home/expo/workingdir/build'. Reason: Task ':app:bundleReleaseJsAndAssets' uses this output of task ':expo-constants:compileReleaseShaders' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.3.3/userguide/validation_problems.html#implicit_dependency for more details about this problem.
295  - Gradle detected a problem with the following location: '/home/expo/workingdir/build'. Reason: Task ':app:bundleReleaseJsAndAssets' uses this output of task ':expo-constants:copyReleaseExpoConfig' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.3.3/userguide/validation_problems.html#implicit_dependency for more details about this problem.
296  - Gradle detected a problem with the following location: '/home/expo/workingdir/build'. Reason: Task ':app:bundleReleaseJsAndAssets' uses this output of task ':expo-constants:createReleaseExpoConfig' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.3.3/userguide/validation_problems.html#implicit_dependency for more details about this problem.
297  - Gradle detected a problem with the following location: '/home/expo/workingdir/build'. Reason: Task ':app:bundleReleaseJsAndAssets' uses this output of task ':expo-constants:mergeReleaseShaders' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.3.3/userguide/validation_problems.html#implicit_dependency for more details about this problem.
298  - Gradle detected a problem with the following location: '/home/expo/workingdir/build'. Reason: Task ':app:bundleReleaseJsAndAssets' uses this output of task ':expo-constants:packageReleaseAssets' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.3.3/userguide/validation_problems.html#implicit_dependency for more details about this problem.
299  - Gradle detected a problem with the following location: '/home/expo/workingdir/build'. Reason: Task ':app:bundleReleaseJsAndAssets' uses this output of task ':expo-dev-client:compileReleaseShaders' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.3.3/userguide/validation_problems.html#implicit_dependency for more details about this problem.
300  - Gradle detected a problem with the following location: '/home/expo/workingdir/build'. Reason: Task ':app:bundleReleaseJsAndAssets' uses this output of task ':expo-dev-client:mergeReleaseShaders' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.3.3/userguide/validation_problems.html#implicit_dependency for more details about this problem.
301  - Gradle detected a problem with the following location: '/home/expo/workingdir/build'. Reason: Task ':app:bundleReleaseJsAndAssets' uses this output of task ':expo-dev-client:packageReleaseAssets' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.3.3/userguide/validation_problems.html#implicit_dependency for more details about this problem.
302  - Gradle detected a problem with the following location: '/home/expo/workingdir/build'. Reason: Task ':app:bundleReleaseJsAndAssets' uses this output of task ':expo-dev-launcher:compileReleaseShaders' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.3.3/userguide/validation_problems.html#implicit_dependency for more details about this problem.
303  - Gradle detected a problem with the following location: '/home/expo/workingdir/build'. Reason: Task ':app:bundleReleaseJsAndAssets' uses this output of task ':expo-dev-launcher:mergeReleaseShaders' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.3.3/userguide/validation_problems.html#implicit_dependency for more details about this problem.
304  - Gradle detected a problem with the following location: '/home/expo/workingdir/build'. Reason: Task ':app:bundleReleaseJsAndAssets' uses this output of task ':expo-dev-launcher:packageReleaseAssets' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.3.3/userguide/validation_problems.html#implicit_dependency for more details about this problem.
305  - Gradle detected a problem with the following location: '/home/expo/workingdir/build'. Reason: Task ':app:bundleReleaseJsAndAssets' uses this output of task ':expo-dev-menu-interface:compileReleaseShaders' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.3.3/userguide/validation_problems.html#implicit_dependency for more details about this problem.
306  - Gradle detected a problem with the following location: '/home/expo/workingdir/build'. Reason: Task ':app:bundleReleaseJsAndAssets' uses this output of task ':expo-dev-menu-interface:mergeReleaseShaders' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.3.3/userguide/validation_problems.html#implicit_dependency for more details about this problem.
307  - Gradle detected a problem with the following location: '/home/expo/workingdir/build'. Reason: Task ':app:bundleReleaseJsAndAssets' uses this output of task ':expo-dev-menu-interface:packageReleaseAssets' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.3.3/userguide/validation_problems.html#implicit_dependency for more details about this problem.
308  - Gradle detected a problem with the following location: '/home/expo/workingdir/build'. Reason: Task ':app:bundleReleaseJsAndAssets' uses this output of task ':expo-dev-menu:compileReleaseShaders' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.3.3/userguide/validation_problems.html#implicit_dependency for more details about this problem.
309  - Gradle detected a problem with the following location: '/home/expo/workingdir/build'. Reason: Task ':app:bundleReleaseJsAndAssets' uses this output of task ':expo-dev-menu:mergeReleaseShaders' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.3.3/userguide/validation_problems.html#implicit_dependency for more details about this problem.
310  - Gradle detected a problem with the following location: '/home/expo/workingdir/build'. Reason: Task ':app:bundleReleaseJsAndAssets' uses this output of task ':expo-dev-menu:packageReleaseAssets' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.3.3/userguide/validation_problems.html#implicit_dependency for more details about this problem.
311  - Gradle detected a problem with the following location: '/home/expo/workingdir/build'. Reason: Task ':app:bundleReleaseJsAndAssets' uses this output of task ':expo-device:compileReleaseShaders' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.3.3/userguide/validation_problems.html#implicit_dependency for more details about this problem.
312  - Gradle detected a problem with the following location: '/home/expo/workingdir/build'. Reason: Task ':app:bundleReleaseJsAndAssets' uses this output of task ':expo-device:mergeReleaseShaders' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.3.3/userguide/validation_problems.html#implicit_dependency for more details about this problem.
313  - Gradle detected a problem with the following location: '/home/expo/workingdir/build'. Reason: Task ':app:bundleReleaseJsAndAssets' uses this output of task ':expo-device:packageReleaseAssets' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.3.3/userguide/validation_problems.html#implicit_dependency for more details about this problem.
314 > Task :react-native-safe-area-context:packageReleaseResources
663 > Task :react-native-screens:generateReleaseResources
664 > Task :react-native-webview:compileReleaseRenderscript NO-SOURCE
665 > Task :react-native-vector-icons:generateReleaseResValues
666 > Task :react-native-vector-icons:generateReleaseResources
667 > Task :react-native-webview:generateReleaseResValues
668 > Task :react-native-webview:generateReleaseResources
669 > Task :react-native-webview:packageReleaseResources
670 > Task :expo:extractDeepLinksRelease
671 > Task :react-native-vector-icons:packageReleaseResources
672 > Task :expo-application:extractDeepLinksRelease
673 > Task :react-native-screens:packageReleaseResources
674 > Task :expo-av:extractDeepLinksRelease
675 > Task :app:bundleReleaseJsAndAssets
676 warning: the transform cache was reset.
677 Error: The resource `/home/expo/workingdir/build/android/.vscode\exponentIndex.js` was not found.
678     at /home/expo/workingdir/build/node_modules/metro/src/IncrementalBundler.js:297:24
679     at gotStat (node:fs:2684:21)
680     at FSReqCallback.oncomplete (node:fs:202:21)
681 info Run CLI with --verbose flag for more details.
682[stderr] error The resource `/home/expo/workingdir/build/android/.vscode\exponentIndex.js` was not found.
683 > Task :app:bundleReleaseJsAndAssets FAILED
684 > Task :expo:processReleaseManifest
685 > Task :expo-av:processReleaseManifest
686 > Task :expo-application:processReleaseManifest
687 Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
688 You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
689 See https://docs.gradle.org/7.3.3/userguide/command_line_interface.html#sec:command_line_warnings
690 Execution optimizations have been disabled for 2 invalid unit(s) of work during this build to ensure correctness.
691 Please consult deprecation warnings for more details.
692 189 actionable tasks: 189 executed
693[stderr] FAILURE: Build failed with an exception.
694[stderr] * What went wrong:
695[stderr] Execution failed for task ':app:bundleReleaseJsAndAssets'.
696[stderr] > Process 'command 'node'' finished with non-zero exit value 1
697[stderr] * Try:
698[stderr] > Run with --stacktrace option to get the stack trace.
699[stderr] > Run with --info or --debug option to get more log output.
700[stderr] > Run with --scan to get full insights.
701[stderr] * Get more help at https://help.gradle.org
702[stderr] BUILD FAILED in 4m 15s
703 Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.

it sounds like, for some reason, you have a js file inside of .vscode\exponentIndex.js? i suspect you don’t have .vscode committed to source control?

Hello there!

Did you manage to get through this?