Command “expo eject” is failing as shown below. Any advise for fixing the issue?
$ expo eject
Your git working tree is clean
To revert the changes after this command completes, you can run the following:
git clean --force && git reset --hard
? What would you like your iOS bundle identifier to be? com.enterprise.reactnativepoc
Created native projects | /ios, /android already created
Added Metro bundler configuration.
Updated package.json and added index.js entry point for iOS and Android.
Removed “main”: “node_modules/expo/AppEntry.js” from package.json because we recommend using index.js as main instead.
Using npm to install packages.
Cleaned JavaScript dependencies.
Installed JavaScript dependencies. The “path” argument must be of type string. Received undefined TypeError [ERR_INVALID_ARG_TYPE] [ERR_INVALID_ARG_TYPE]: The “path” argument must be of type string. Received undefined
** at validateString (internal/validators.js:120:11)**
** at Object.resolve (path.js:980:7)**
** at new pbxProject (/Users/eslalaguse/.npm-global/lib/node_modules/expo-cli/node_modules/xcode/lib/pbxProject.js:35:26)**
** at Object.pbxProject [as project] (/Users/eslalaguse/.npm-global/lib/node_modules/expo-cli/node_modules/xcode/lib/pbxProject.js:33:16)**
** at Object.getPbxproj (/Users/eslalaguse/.npm-global/lib/node_modules/expo-cli/node_modules/@expo/config/src/ios/utils/Xcodeproj.ts:164:25)**
** at Object.setDeviceFamily (/Users/eslalaguse/.npm-global/lib/node_modules/expo-cli/node_modules/@expo/config/src/ios/DeviceFamily.ts:52:19)**
** at configureIOSProjectAsync (/Users/eslalaguse/.npm-global/lib/node_modules/expo-cli/src/commands/apply/configureIOSProjectAsync.ts:17:26)**
** at configureIOSStepAsync (/Users/eslalaguse/.npm-global/lib/node_modules/expo-cli/src/commands/eject/Eject.ts:166:3)**
** at Object.ejectAsync (/Users/eslalaguse/.npm-global/lib/node_modules/expo-cli/src/commands/eject/Eject.ts:81:3)**
** at action (/Users/eslalaguse/.npm-global/lib/node_modules/expo-cli/src/commands/eject.ts:48:5)**
** at Command. (/Users/eslalaguse/.npm-global/lib/node_modules/expo-cli/src/exp.ts:302:7)**
So I tried creating a new demo project to demonstrate the issue, but seems that expo eject works fine on a fresh app. I cannot share the actual project where I’m experiencing the issue as it is for my work. Sorry I’m not able to provide more, hopefully others who are facing this can share something.
Thanks for the response and for making the issue. Would you mind elaborating on the device family configuration, please? I have the following in my app config:
ok it seems unrelated to that in your case then. can you share more information? notice in the original post the user shared the full log of running the command which included valuable information
expo eject --npm
Warning! Your git working tree is dirty.
It's recommended to commit all your changes before proceeding, so you can revert the changes made by this command if necessary.
✔ Would you like to proceed? … yes
📝 Android package Learn more: https://expo.fyi/android-package
? What would you like your Android package name to be? chat.demo.app
📝 iOS Bundle Identifier Learn more: https://expo.fyi/bundle-identifier
? What would you like your iOS bundle identifier to be? chat.demo.app
✔ Created native projects | /ios, /index.js already created
✔ Added Metro bundler configuration.
✔ Updated package.json and added index.js entry point for iOS and Android.
- Removed "main": "node_modules/expo/AppEntry.js" from package.json because we recommend using index.js as main instead.
📦 Using npm to install packages.
✔ Cleaned JavaScript dependencies.
✔ Installed JavaScript dependencies.
The "path" argument must be of type string. Received undefined
TypeError [ERR_INVALID_ARG_TYPE] [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
at validateString (internal/validators.js:120:11)
at Object.resolve (path.js:980:7)
at new pbxProject (/usr/local/lib/node_modules/expo-cli/node_modules/@expo/config/node_modules/xcode/lib/pbxProject.js:35:26)
at Object.pbxProject [as project] (/usr/local/lib/node_modules/expo-cli/node_modules/@expo/config/node_modules/xcode/lib/pbxProject.js:33:16)
at Object.getPbxproj (/usr/local/lib/node_modules/expo-cli/node_modules/@expo/config/src/ios/utils/Xcodeproj.ts:164:25)
at Object.setDeviceFamily (/usr/local/lib/node_modules/expo-cli/node_modules/@expo/config/src/ios/DeviceFamily.ts:52:19)
at configureIOSProjectAsync (/usr/local/lib/node_modules/expo-cli/src/commands/apply/configureIOSProjectAsync.ts:17:26)
at configureIOSStepAsync (/usr/local/lib/node_modules/expo-cli/src/commands/eject/Eject.ts:165:3)
at Object.ejectAsync (/usr/local/lib/node_modules/expo-cli/src/commands/eject/Eject.ts:80:3)
at action (/usr/local/lib/node_modules/expo-cli/src/commands/eject.ts:49:5)
at Command.<anonymous> (/usr/local/lib/node_modules/expo-cli/src/exp.ts:331:7)
Was able to successfully eject and generate the iOS and Android project files. However, when I try to actually launch the iOS app from Xcode, I am hit with a brand new issue, errors about expo-update exactly as described in the Git issue linked below.
Expo CLI 3.27.14 environment info:
System:
OS: Windows 10 10.0.19041
Binaries:
Node: 14.5.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.4 - C:\Users\DevD\AppData\Roaming\npm\yarn.CMD
npm: 6.14.5 - C:\Program Files\nodejs\npm.CMD
SDKs:
Android SDK:
API Levels: 28, 29, 30
Build Tools: 28.0.3, 30.0.0, 30.0.1
System Images: android-29 | Google APIs Intel x86 Atom
IDEs:
Android Studio: Version 4.0.0.0 AI-193.6911.18.40.6626763
npmPackages:
expo: ~38.0.8 => 38.0.8
react: ~16.11.0 => 16.11.0
react-dom: ~16.11.0 => 16.11.0
react-native: ~0.62.2 => 0.62.2
react-native-web: ~0.11.7 => 0.11.7
Expo Workflow: bare
√ Created native projects | /ios, /android already created
√ Added Metro bundler configuration.
√ Updated package.json and added index.js entry point for iOS and Android.
- Removed "main": "node_modules/expo/AppEntry.js" from package.json because we recommend using index.js as main instead.
� Using npm to install packages.
√ Cleaned JavaScript dependencies.
√ Installed JavaScript dependencies.
The "path" argument must be of type string. Received undefined
TypeError [ERR_INVALID_ARG_TYPE] [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
at validateString (internal/validators.js:121:11)
at Object.resolve (path.js:139:9)
at new pbxProject (C:\Users\DevD\AppData\Roaming\npm\node_modules\expo-cli\node_modules\@expo\config\node_modules\xcode\lib\pbxProject.js:35:26)
at Object.pbxProject [as project] (C:\Users\DevD\AppData\Roaming\npm\node_modules\expo-cli\node_modules\@expo\config\node_modules\xcode\lib\pbxProject.js:33:16)
at Object.getPbxproj (C:\Users\DevD\AppData\Roaming\npm\node_modules\expo-cli\node_modules\@expo\config\src\ios\utils\Xcodeproj.ts:164:25)
at Object.setDeviceFamily (C:\Users\DevD\AppData\Roaming\npm\node_modules\expo-cli\node_modules\@expo\config\src\ios\DeviceFamily.ts:52:19)
at configureIOSProjectAsync (C:\Users\DevD\AppData\Roaming\npm\node_modules\expo-cli\src\commands\apply\configureIOSProjectAsync.ts:17:26)
at configureIOSStepAsync (C:\Users\DevD\AppData\Roaming\npm\node_modules\expo-cli\src\commands\eject\Eject.ts:165:3)
at Object.ejectAsync (C:\Users\DevD\AppData\Roaming\npm\node_modules\expo-cli\src\commands\eject\Eject.ts:80:3)
at action (C:\Users\DevD\AppData\Roaming\npm\node_modules\expo-cli\src\commands\eject.ts:49:5)
at Command.<anonymous> (C:\Users\DevD\AppData\Roaming\npm\node_modules\expo-cli\src\exp.ts:331:7)