Skip to content
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

EAS Update: cannot build #1784

Closed
zdnk opened this issue Apr 11, 2023 · 12 comments
Closed

EAS Update: cannot build #1784

zdnk opened this issue Apr 11, 2023 · 12 comments

Comments

@zdnk
Copy link

zdnk commented Apr 11, 2023

Build/Submit details page URL

No response

Summary

Hello, I am unable to build an update to publish to our users. I've never done it, this is the first time I tried.

Managed or bare?

Managed

Environment

expo-env-info 1.0.5 environment info:
System:
OS: macOS 13.1
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 18.15.0 - ~/.nvm/versions/node/v18.15.0/bin/node
Yarn: 1.22.19 - ~/.nvm/versions/node/v18.15.0/bin/yarn
npm: 9.6.1 - ~/.nvm/versions/node/v18.15.0/bin/npm
Watchman: 2023.02.27.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.11.3 - /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
IDEs:
Xcode: 14.2/14C18 - /usr/bin/xcodebuild
npmPackages:
expo: ~48.0.9 => 48.0.10
metro: ^0.73.7 => 0.73.9
react: 18.2.0 => 18.2.0
react-dom: 18.2.0 => 18.2.0
react-native: 0.71.4 => 0.71.4
react-native-web: ~0.18.9 => 0.18.12
npmGlobalPackages:
eas-cli: 3.9.1
Expo Workflow: managed

Error output

% eas update --auto
[expo-cli] Starting Metro Bundler
[expo-cli] Web Bundling failed 16144ms
[expo-cli] Error: Unable to resolve module ../../Utilities/Platform from /Users/z/projects//app/node_modules/react-native/Libraries/Components/TextInput/TextInputState.js:
[expo-cli]
[expo-cli] None of these files exist:
[expo-cli] * node_modules/react-native/Libraries/Utilities/Platform(.native|.web.ts|.native.ts|.ts|.web.tsx|.native.tsx|.tsx|.web.js|.native.js|.js|.web.jsx|.native.jsx|.jsx|.web.json|.native.json|.json|.web.svg|.native.svg|.svg)
[expo-cli] * node_modules/react-native/Libraries/Utilities/Platform/index(.native|.web.ts|.native.ts|.ts|.web.tsx|.native.tsx|.tsx|.web.js|.native.js|.js|.web.jsx|.native.jsx|.jsx|.web.json|.native.json|.json|.web.svg|.native.svg|.svg)
[expo-cli] 24 |
[expo-cli] 25 | const {findNodeHandle} = require('../../ReactNative/RendererProxy');
[expo-cli] > 26 | const Platform = require('../../Utilities/Platform');
[expo-cli] | ^
[expo-cli] 27 | const React = require('react');
[expo-cli] 28 | type ComponentRef = React.ElementRef<HostComponent>;
[expo-cli] 29 |
[expo-cli] Error: Unable to resolve module ../../Utilities/Platform from /Users/z/projects//app/node_modules/react-native/Libraries/Components/TextInput/TextInputState.js:
[expo-cli]
[expo-cli] None of these files exist:
[expo-cli] * node_modules/react-native/Libraries/Utilities/Platform(.native|.web.ts|.native.ts|.ts|.web.tsx|.native.tsx|.tsx|.web.js|.native.js|.js|.web.jsx|.native.jsx|.jsx|.web.json|.native.json|.json|.web.svg|.native.svg|.svg)
[expo-cli] * node_modules/react-native/Libraries/Utilities/Platform/index(.native|.web.ts|.native.ts|.ts|.web.tsx|.native.tsx|.tsx|.web.js|.native.js|.js|.web.jsx|.native.jsx|.jsx|.web.json|.native.json|.json|.web.svg|.native.svg|.svg)
[expo-cli] 24 |
[expo-cli] 25 | const {findNodeHandle} = require('../../ReactNative/RendererProxy');
[expo-cli] > 26 | const Platform = require('../../Utilities/Platform');
[expo-cli] | ^
[expo-cli] 27 | const React = require('react');
[expo-cli] 28 | type ComponentRef = React.ElementRef<HostComponent>;
[expo-cli] 29 |
[expo-cli] at ModuleResolver.resolveDependency (/Users/z/projects//app/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:137:15)
[expo-cli] at DependencyGraph.resolveDependency (/Users/z/projects//app/node_modules/metro/src/node-haste/DependencyGraph.js:260:43)
[expo-cli] at Object.resolve (/Users/z/projects//app/node_modules/metro/src/lib/transformHelpers.js:177:21)
[expo-cli] at Graph._resolveDependencies (/Users/z/projects//app/node_modules/metro/src/DeltaBundler/Graph.js:432:35)
[expo-cli] at Graph._processModule (/Users/z/projects//app/node_modules/metro/src/DeltaBundler/Graph.js:218:38)
[expo-cli] at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[expo-cli] at async Graph._addDependency (/Users/z/projects//app/node_modules/metro/src/DeltaBundler/Graph.js:314:20)
[expo-cli] at async Promise.all (index 1)
[expo-cli] at async Graph._processModule (/Users/z/projects//app/node_modules/metro/src/DeltaBundler/Graph.js:263:5)
[expo-cli] at async Graph._addDependency (/Users/z/projects//app/node_modules/metro/src/DeltaBundler/Graph.js:314:20)
✖ Export failed

Reproducible demo or steps to reproduce from a blank project

Cant say how to reproduce.

@zdnk zdnk added the needs review Issue is ready to be reviewed by a maintainer label Apr 11, 2023
@RashedMahyoub
Copy link

I've been having the same problem today. It doesn't give any error when using eas build but when trying to eas update, I get this error.

@quinlanj
Copy link
Member

quinlanj commented Apr 18, 2023

@zdnk just as a sanity check, could you make sure all your dependencies are up to date by running this in your project directory :

# remove all your dependencies
rm -rf node_modules 

# reinstall dependencies again
yarn # or npm install

then run eas update --auto again.

If you are still getting an error can you share your package.json please

@quinlanj quinlanj added needs more info and removed needs review Issue is ready to be reviewed by a maintainer labels Apr 18, 2023
@zdnk
Copy link
Author

zdnk commented Apr 18, 2023

Tried it, still same.

[expo-cli] Android Bundling failed 3657ms
[expo-cli] Error: Unable to resolve module @babel/runtime/helpers/classCallCheck from /Users/z/projects/redacted/app/node_modules/expo-asset/build/Asset.js: @babel/runtime/helpers/classCallCheck could not be found within the project or in these directories:
[expo-cli] node_modules
[expo-cli] > 1 | import { Platform } from 'expo-modules-core';
[expo-cli] 2 | import { getAssetByID } from 'react-native/Libraries/Image/AssetRegistry';
[expo-cli] 3 | import { selectAssetSource } from './AssetSources';
[expo-cli] 4 | import * as AssetUris from './AssetUris';
[expo-cli] Error: Unable to resolve module @babel/runtime/helpers/classCallCheck from /Users/z/projects/redacted/app/node_modules/expo-asset/build/Asset.js: @babel/runtime/helpers/classCallCheck could not be found within the project or in these directories:
[expo-cli] node_modules
[expo-cli] > 1 | import { Platform } from 'expo-modules-core';
[expo-cli] 2 | import { getAssetByID } from 'react-native/Libraries/Image/AssetRegistry';
[expo-cli] 3 | import { selectAssetSource } from './AssetSources';
[expo-cli] 4 | import * as AssetUris from './AssetUris';
[expo-cli] at ModuleResolver.resolveDependency (/Users/z/projects/redacted/app/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:162:15)
[expo-cli] at DependencyGraph.resolveDependency (/Users/z/projects/redacted/app/node_modules/metro/src/node-haste/DependencyGraph.js:260:43)
[expo-cli] at Object.resolve (/Users/z/projects/redacted/app/node_modules/metro/src/lib/transformHelpers.js:177:21)
[expo-cli] at Graph._resolveDependencies (/Users/z/projects/redacted/app/node_modules/metro/src/DeltaBundler/Graph.js:432:35)
[expo-cli] at Graph._processModule (/Users/z/projects/redacted/app/node_modules/metro/src/DeltaBundler/Graph.js:218:38)
[expo-cli] at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[expo-cli] at async Graph._addDependency (/Users/z/projects/redacted/app/node_modules/metro/src/DeltaBundler/Graph.js:314:20)
[expo-cli] at async Promise.all (index 1)
[expo-cli] at async Graph._processModule (/Users/z/projects/redacted/app/node_modules/metro/src/DeltaBundler/Graph.js:263:5)
[expo-cli] at async Graph._addDependency (/Users/z/projects/redacted/app/node_modules/metro/src/DeltaBundler/Graph.js:314:20)

{
  "name": "redacted",
  "version": "4.0.0",
  "main": "index.js",
  "scripts": {
    "dev": "concurrently \"npm run start\" \"npm run watch\"",
    "start": "expo start",
    "start:dev": "expo start --dev-client",
    "start:dev-clear": "expo start --dev-client --clear",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web",
    "generate": "graphql-codegen --config libs/api/generator.ts",
    "prestart": "npm run generate",
    "predev": "npm run generate",
    "watch": "npm run generate -- --watch",
    "prettier": "prettier --write \"./**/*.{js,jsx,ts,tsx,json}\""
  },
  "dependencies": {
    "@apollo/client": "^3.7.11",
    "@expo/config-plugins": "^6.0.0",
    "@expo/react-native-action-sheet": "^4.0.1",
    "@flyerhq/react-native-chat-ui": "^1.4.3",
    "@gorhom/bottom-sheet": "^4.4.5",
    "@invertase/react-native-apple-authentication": "^2.2.2",
    "@react-native-community/datetimepicker": "6.7.3",
    "@react-native-firebase/analytics": "^17.4.2",
    "@react-native-firebase/app": "^17.4.2",
    "@react-native-firebase/auth": "^17.4.2",
    "@react-native-firebase/firestore": "^17.4.2",
    "@react-native-firebase/installations": "^17.4.2",
    "@react-native-firebase/messaging": "^17.4.2",
    "@react-native-google-signin/google-signin": "^9.0.2",
    "@react-navigation/bottom-tabs": "^6.5.7",
    "@react-navigation/native": "^6.1.6",
    "@react-navigation/native-stack": "^6.9.12",
    "@sentry/react-native": "4.13.0",
    "@stripe/stripe-react-native": "^0.23.3",
    "@tanstack/react-query": "^4.28.0",
    "babel-plugin-transform-inline-environment-variables": "^0.4.4",
    "concurrently": "^7.6.0",
    "customerio-expo-plugin": "^1.0.0-beta.7",
    "customerio-reactnative": "^2.2.0",
    "expo": "~48.0.10",
    "expo-apple-authentication": "^6.0.1",
    "expo-application": "~5.1.1",
    "expo-build-properties": "~0.5.1",
    "expo-checkbox": "~2.3.1",
    "expo-constants": "~14.2.1",
    "expo-dev-client": "~2.1.6",
    "expo-device": "~5.2.1",
    "expo-image-manipulator": "~11.1.1",
    "expo-image-picker": "~14.1.1",
    "expo-linking": "~4.0.1",
    "expo-localization": "~14.1.1",
    "expo-notifications": "~0.18.1",
    "expo-splash-screen": "~0.18.1",
    "expo-status-bar": "~1.4.4",
    "expo-system-ui": "~2.2.1",
    "expo-tracking-transparency": "~3.0.3",
    "expo-updates": "~0.16.4",
    "expo-web-browser": "~12.1.1",
    "extract-files": "^11.0.0",
    "formik": "^2.2.9",
    "graphql": "^16.6.0",
    "graphql-upload": "^16.0.2",
    "moment": "^2.29.4",
    "promise": "^8.3.0",
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "react-error-boundary": "^4.0.3",
    "react-native": "0.71.6",
    "react-native-appsflyer": "^6.9.4",
    "react-native-dialog": "^9.3.0",
    "react-native-error-boundary": "^1.2.3",
    "react-native-fbsdk-next": "^11.2.0",
    "react-native-gesture-handler": "~2.9.0",
    "react-native-gifted-chat": "^2.0.1",
    "react-native-mime-types": "^2.4.0",
    "react-native-modal-datetime-picker": "^14.0.1",
    "react-native-reanimated": "~2.14.4",
    "react-native-safe-area-context": "4.5.0",
    "react-native-screens": "~3.20.0",
    "react-native-select-dropdown": "^3.3.2",
    "react-native-svg": "13.4.0",
    "react-native-svg-transformer": "^1.0.0",
    "react-native-uuid": "^2.0.1",
    "react-native-vector-icons": "^9.2.0",
    "react-native-web": "~0.18.9",
    "sentry-expo": "^6.1.1",
    "yup": "^1.0.2"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9",
    "@graphql-codegen/add": "^4.0.1",
    "@graphql-codegen/cli": "^3.2.1",
    "@graphql-codegen/typescript-operations": "^3.0.1",
    "@graphql-codegen/typescript-react-apollo": "^3.3.7",
    "@types/apollo-upload-client": "^17.0.2",
    "@types/react": "~18.0.28",
    "@types/react-native-vector-icons": "^6.4.13",
    "@typescript-eslint/eslint-plugin": "^5.55.0",
    "apollo-upload-client": "^17.0.0",
    "babel-plugin-module-resolver": "^5.0.0",
    "eslint": "^8.36.0",
    "eslint-config-prettier": "^8.7.0",
    "eslint-config-standard-with-typescript": "^34.0.1",
    "eslint-plugin-import": "^2.27.5",
    "eslint-plugin-n": "^15.6.1",
    "eslint-plugin-promise": "^6.1.1",
    "eslint-plugin-react": "^7.32.2",
    "eslint-plugin-react-native": "^4.0.0",
    "metro": "^0.73.7",
    "metro-resolver": "^0.73.7",
    "prettier": "2.8.4",
    "typescript": "^4.9.5"
  },
  "private": true
}

@RashedMahyoub
Copy link

I don't know why but whenever I remove this part from app.json, eas update works

"web": {
      "bundler": "metro"
    }

@zdnk
Copy link
Author

zdnk commented Apr 19, 2023

Does not work for me. Also each time the error is different actually. Each time it says it cannot resolve different module.

@quinlanj
Copy link
Member

quinlanj commented Apr 19, 2023

Interesting. @zdnk could you try to clear the metro cache by running npx expo start --clear (this should be using the metro bundler also and i'd expect you to see the same behaviour here, lmk if thats not the case)? Found this and it looks like relevant to your problem. It's a different binary than eas but they should all call into the metro bundler that shares the same metro cache at $TMPDIR/metro-cache

@quinlanj
Copy link
Member

Closing due to inactivity

@quinlanj
Copy link
Member

Update: I've landed #1839 that will add the a --clear-cache flag to eas update to clear the metro bundler cache. It will be available in the next patch release of eas-cli.

@nilsm
Copy link

nilsm commented Aug 12, 2023

I ended up with the same error - for me it was a missing platform identifier in the update command. This did the trick:

eas update --platform android --branch preview --message 'Updating the app'

@BenBrownCreative
Copy link

Glad I stumbled across this thread. @nilsm's comment saved my day. Updating each platform separately in worked for me.

@joohnsro
Copy link

joohnsro commented Mar 22, 2024

Hello @zdnk, I wish you had the same luck that I were today to did this app work.

After update like @quinlanj said, I did this command and works:
npx eas-cli update

Previously, I did this command and get the error:
eas update

I expect this could be usefull for somebody.

@azbub
Copy link

azbub commented Apr 5, 2024

@

this worked

I don't know why but whenever I remove this part from app.json, eas update works

"web": {
      "bundler": "metro"
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants