2

I'm getting this issue when I try to get archive.

I got react-native 0.63, I got expo, expo-cli.

I tried to reinstall pod, removed nodule modules and reinstall etc.

what could be the solution?

info Writing bundle output to:, /Users/tufancagkansokmen/Library/Developer/Xcode/DerivedData/lastsisapp-gtlfysxutnqqnrbbwrcxtyldvttq/Build/Intermediates.noindex/ArchiveIntermediates/lastsisapp/BuildProductsPath/Release-iphoneos/lastsisapp.app/main.jsbundle
info Done writing bundle output
info Copying 76 asset files
info Done copying assets
+ [[ false != true ]]
+ [[ ! -f /Users/tufancagkansokmen/Library/Developer/Xcode/DerivedData/lastsisapp-gtlfysxutnqqnrbbwrcxtyldvttq/Build/Intermediates.noindex/ArchiveIntermediates/lastsisapp/BuildProductsPath/Release-iphoneos/lastsisapp.app/main.jsbundle ]]
                 Welcome to React Native!
                Learn once, write anywhere


node:events:306
      throw er; // Unhandled 'error' event
      ^

Error: EMFILE: too many open files, watch
    at FSEvent.FSWatcher._handle.onchange (node:internal/fs/watchers:178:28)
Emitted 'error' event on NodeWatcher instance at:
    at NodeWatcher.checkedEmitError (/Users/tufancagkansokmen/works/lastsis-app/node_modules/sane/src/node_watcher.js:143:12)
    at FSWatcher.emit (node:events:329:20)
    at FSEvent.FSWatcher._handle.onchange (node:internal/fs/watchers:184:12) {
  errno: -24,
  syscall: 'watch',
  code: 'EMFILE',
  filename: null
}
Command PhaseScriptExecution failed with a nonzero exit code
kidroca
  • 3,480
  • 2
  • 27
  • 44
TCS
  • 629
  • 3
  • 11
  • 32
  • I think the same issue is discussed here: https://stackoverflow.com/questions/58675179/error-emfile-too-many-open-files-react-native-cli – kidroca Jan 22 '21 at 15:16

3 Answers3

1

try to reinstall watchman. For me this one worked.

brew reinstall watchman

But you can try also these.

brew update

brew install watchman
Gergo Nagy
  • 19
  • 5
0

I had similar errors. Deleting yarn.lock file and running

yarn install

fixed the problem.

DharmanBot
  • 1,066
  • 2
  • 6
  • 10
0

Error: PhaseScriptExecution [CP-User]\ Generate\ Specs /Users/gps/Library/Developer/Xcode/DerivedData/Meetha-hklxxjwxqigzbpbrkplqaqaleaob/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/React-rncore.build/Script-46EB2E00018190.sh (in target 'React-rncore' from project 'Pods')

Original Directory Structure:

My Work/Meetha/...

Solution: The issue was caused by the space in the directory name "My Work."

Updated Directory Structure:

MyWork/Meetha/...

By removing the space in the directory name, the "PhaseScriptExecution" error was resolved. This is a good reminder that keeping directory and file names free of special characters and spaces can prevent unexpected issues in various development processes.

Error:

While creating project I was also facing this issue related to pods.

PhaseScriptExecution [CP]\ Copy\ XCFrameworks /Users/gps/Library/Developer/Xcode/DerivedData/Meetha-hklxxjwxqigzbpbrkplqaqaleaob/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/hermes-engine.build/Script-46EB2E000181A0.sh (in target 'hermes-engine' from project 'Pods')

Solution:

After creating your project, navigate to your project's ios directory.

In the terminal, run the following command:

pod install

Running pod install in your project's ios directory will install the necessary dependencies using CocoaPods. This step is commonly required for iOS projects that use external libraries or frameworks.