expo eject: The "path" argument must be of type string. Received undefined

Please provide the following:

  1. SDK Version: 37
  2. Platforms(Android/iOS/web/all): all

When I try to ‘expo eject’ my project I receive:

...
✔ App configuration (app.json) updated.
✔ Created native project directories (./ios and ./android) and updated .gitignore.
✔ Updated package.json and added index.js entry point for iOS and Android.
✔ Installed JavaScript dependencies.

⠋ Applying iOS configurationThe "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.dirname (path.js:1128:5)
    at getSourceRoot (/usr/local/lib/node_modules/expo-cli/node_modules/@expo/config/src/ios/utils/Xcodeproj.ts:16:15)
    at Object.getProjectName (/usr/local/lib/node_modules/expo-cli/node_modules/@expo/config/src/ios/utils/Xcodeproj.ts:9:22)
    at getDefaultEntitlementsPath (/usr/local/lib/node_modules/expo-cli/node_modules/@expo/config/src/ios/Entitlements.ts:99:23)
    at createEntitlementsFile (/usr/local/lib/node_modules/expo-cli/node_modules/@expo/config/src/ios/Entitlements.ts:75:28)
    at Object.getEntitlementsPath (/usr/local/lib/node_modules/expo-cli/node_modules/@expo/config/src/ios/Entitlements.ts:68:54)
    at modifyEntitlementsPlistAsync (/expo-cli@3.18.2/src/commands/apply/configureIOSProjectAsync.ts:52:49)
    at configureIOSProjectAsync (/expo-cli@3.18.2/src/commands/apply/configureIOSProjectAsync.ts:31:9)
    at configureIOSStepAsync (/expo-cli@3.18.2/src/commands/eject/Eject.ts:102:3)
    at Object.ejectAsync (/expo-cli@3.18.2/src/commands/eject/Eject.ts:50:3)
    at action (/expo-cli@3.18.2/src/commands/eject.ts:36:5)
    at Command.<anonymous> (/expo-cli@3.18.2/src/exp.ts:85:7)

What is wrong?

for now, downgrade helped me out
npm i -g expo-cli@3.12.0

1 Like

what’s the solution I am facing this issue on latest expo-cli version please help

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