exp detatch > ENOENT: no such file or directory, open '/Users/username/ProjectName/android/run.sh'


#1

Hello there:

I followed the following article: https://docs.expo.io/versions/v28.0.0/expokit/detach/

and when using the exp detatch function I get the following:

exp detach
We've built a brand new CLI for Expo!
Expo CLI is a drop in replacement for exp.
Install: npm install -g expo-cli
Use: expo --help
Read more: https://blog.expo.io/expo-cli-2-0-released-a7a9c250e99c
Validating project manifest...
You have not specified a custom scheme for deep linking. A default value of expxxxxxxxxx7178fddaf4148 will be used. You can change this later by following the instructions in this guide: https://docs.expo.io/versions/latest/workflow/linking
Creating ExpoKit workspace at /Users/username/ProjectName/ios...
Downloading iOS code...
Moving iOS project files...
Attempting to create project directory...
Created project directory! Copying files:
Naming iOS project...
Configuring iOS dependencies...
Configuring iOS project...
{ buildPhase: 'configuring NSBundle' } 'Modifying NSBundle configuration at /Users/username/ProjectName/Supporting...'
We added some permissions keys to `Info.plist` in your detached iOS project:
  NSCalendarsUsageDescription
  NSMotionUsageDescription
  NSCameraUsageDescription
  NSMicrophoneUsageDescription
  NSRemindersUsageDescription
  NSPhotoLibraryAddUsageDescription
  NSContactsUsageDescription
  NSPhotoLibraryUsageDescription
  NSLocationWhenInUseUsageDescription
You may want to revise them to include language appropriate to your project. You can also remove them if your app will never use the corresponding API. See the Apple docs for these keys.
{ buildPhase: 'configuring NSBundle' } 'Using standalone config:' { manifestUrl: 'exp://exp.host/@julesmoretti/project-name,
  isShell: true,
  releaseChannel: 'default',
  isManifestVerificationBypassed: true }
Your iOS ExpoKit project will not contain an .entitlements file by default. If you need specific Apple entitlements, enable them manually via Xcode or the Apple Developer website.
{ buildPhase: 'configuring NSBundle' } 'Configuring iOS Launch Screen...'
{ buildPhase: 'configuring NSBundle' } 'Cleaning up iOS...'
iOS detach is complete!
Moving Android project files...
Downloading Android code...
{ buildPhase: 'copying initial shell app files' } 'Warning: Could not copy run.sh to shell app directory.'
{ buildPhase: 'copying initial shell app files' } 'Warning: Could not copy maven to shell app directory.'
Updating Android app...
{ buildPhase: 'running shell app modifications' } 'Warning: No config file specified.'
[10:54:43] ENOENT: no such file or directory, open '/Users/username/ProjectName/android/run.sh'

Which then when trying to build something in Xcode using react-native run-ios I get the following errors:

Found Xcode workspace project-name.xcworkspace
Launching iPhone 6 (iOS 12.1)...
Building using "xcodebuild -workspace project-name.xcworkspace -configuration Debug -scheme project-name -destination id=0A8BA1E5-01B0-40F3-B823-850AD6360651 -derivedDataPath build"
User defaults from command line:

    IDEDerivedDataPathOverride = /Users/username/ProjectName/ios/build


Prepare build

note: Using legacy build system



=== BUILD TARGET Voice OF PROJECT Voice WITH CONFIGURATION Debug ===


Check dependencies




Write auxiliary files
write-file /Users/username/ProjectName/ios/build/Build/Intermediates.noindex/Voice.build/Debug-iphonesimulator/Voice.build/Voice-own-target-headers.hmap
write-file /Users/username/ProjectName/ios/build/Build/Intermediates.noindex/Voice.build/Debug-iphonesimulator/Voice.build/Voice-all-non-framework-target-headers.hmap
write-file /Users/username/ProjectName/ios/build/Build/Intermediates.noindex/Voice.build/Debug-iphonesimulator/Voice.build/Voice-project-headers.hmap
write-file /Users/username/ProjectName/ios/build/Build/Intermediates.noindex/Voice.build/Debug-iphonesimulator/Voice.build/Voice-all-target-headers.hmap
/bin/mkdir -p /Users/username/ProjectName/ios/build/Build/Intermediates.noindex/Voice.build/Debug-iphonesimulator/Voice.build/Objects-normal/x86_64
write-file /Users/username/ProjectName/ios/build/Build/Intermediates.noindex/Voice.build/Debug-iphonesimulator/Voice.build/Objects-normal/x86_64/Voice.LinkFileList
write-file /Users/username/ProjectName/ios/build/Build/Intermediates.noindex/Voice.build/Debug-iphonesimulator/Voice.build/Voice.hmap
write-file /Users/username/ProjectName/ios/build/Build/Intermediates.noindex/Voice.build/Debug-iphonesimulator/Voice.build/Voice-generated-files.hmap


CompileC /Users/username/ProjectName/ios/build/Build/Intermediates.noindex/Voice.build/Debug-iphonesimulator/Voice.build/Objects-normal/x86_64/Voice.o Voice/Voice.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
    cd /Users/username/ProjectName/node_modules/react-native-voice/ios
    export LANG=en_US.US-ASCII
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch x86_64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu99 -fobjc-arc -fmodules -fmodules-cache-path=/Users/username/ProjectName/ios/build/ModuleCache.noindex -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/Users/username/ProjectName/ios/build/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -fno-common -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wdocumentation -Wunreachable-code -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Wno-objc-interface-ivars -Werror=objc-root-class -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wno-non-literal-null-conversion -Wno-objc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DDEBUG=1 -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk -fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -mios-simulator-version-min=10.3 -g -Wno-sign-conversion -Winfinite-recursion -Wno-comma -Wno-block-capture-autoreleasing -Wno-strict-prototypes -Wno-semicolon-before-method-body -fobjc-abi-version=2 -fobjc-legacy-dispatch -index-store-path /Users/username/ProjectName/ios/build/Index/DataStore -iquote /Users/username/ProjectName/ios/build/Build/Intermediates.noindex/Voice.build/Debug-iphonesimulator/Voice.build/Voice-generated-files.hmap -I/Users/username/ProjectName/ios/build/Build/Intermediates.noindex/Voice.build/Debug-iphonesimulator/Voice.build/Voice-own-target-headers.hmap -I/Users/username/ProjectName/ios/build/Build/Intermediates.noindex/Voice.build/Debug-iphonesimulator/Voice.build/Voice-all-target-headers.hmap -iquote /Users/username/ProjectName/ios/build/Build/Intermediates.noindex/Voice.build/Debug-iphonesimulator/Voice.build/Voice-project-headers.hmap -I/Users/username/ProjectName/ios/build/Build/Products/Debug-iphonesimulator/include -isystem /Users/username/ProjectName/node_modules/react-native-voice/ios/../node_modules/react-native/React/Base -isystem /Users/username/ProjectName/node_modules/react-native-voice/ios/../node_modules/react-native/Libraries -I/Users/username/ProjectName/ios/build/Build/Intermediates.noindex/Voice.build/Debug-iphonesimulator/Voice.build/DerivedSources/x86_64 -I/Users/username/ProjectName/ios/build/Build/Intermediates.noindex/Voice.build/Debug-iphonesimulator/Voice.build/DerivedSources -F/Users/username/ProjectName/ios/build/Build/Products/Debug-iphonesimulator -MMD -MT dependencies -MF /Users/username/ProjectName/ios/build/Build/Intermediates.noindex/Voice.build/Debug-iphonesimulator/Voice.build/Objects-normal/x86_64/Voice.d --serialize-diagnostics /Users/username/ProjectName/ios/build/Build/Intermediates.noindex/Voice.build/Debug-iphonesimulator/Voice.build/Objects-normal/x86_64/Voice.dia -c /Users/username/ProjectName/node_modules/react-native-voice/ios/Voice/Voice.m -o /Users/username/ProjectName/ios/build/Build/Intermediates.noindex/Voice.build/Debug-iphonesimulator/Voice.build/Objects-normal/x86_64/Voice.o

In file included from /Users/username/ProjectName/node_modules/react-native-voice/ios/Voice/Voice.m:1:
/Users/username/ProjectName/node_modules/react-native-voice/ios/Voice/Voice.h:1:9: fatal error: 'React/RCTBridgeModule.h' file not found
#import <React/RCTBridgeModule.h>
        ^~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.



** BUILD FAILED **


The following build commands failed:

	CompileC /Users/username/ProjectName/ios/build/Build/Intermediates.noindex/Voice.build/Debug-iphonesimulator/Voice.build/Objects-normal/x86_64/Voice.o Voice/Voice.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

Installing build/Build/Products/Debug-iphonesimulator/project-name.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
Print: Entry, ":CFBundleIdentifier", Does Not Exist

Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/project-name.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist


Error: Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/project-name.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist

    at checkExecSyncError (child_process.js:600:11)
    at Object.execFileSync (child_process.js:618:13)
    at /Users/username/ProjectName/node_modules/react-native/local-cli/runIOS/runIOS.js:208:1

any help would be most welcome.

Thank you.


#2

Hey @julesmoretti,

We’ve long since replaced the exp CLI with our expo-CLI. Can you install that via yarn or npm and try running expo eject?

Cheers,
Adam