question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PhaseScriptExecution error generate-specs.sh: line 27: cd: : No such file or directory

See original GitHub issue

Please provide all the information requested. Issues that do not follow this format are likely to stall.

Description

Provide a detailed list of steps that reproduce the issue. I am creating a new react native project and any time i run (npx react-native run-ios --device"") i get this error i have been solving this error (using series of solution from stack overflow and gitHub issues) for 2 days now any help, I would really appreciate it.

I have tried a number of solutions from GitHub issues, no result yet, please any help to solve this would be much appreciated.

/Users/nitin/Downloads/SampleProject/ios/Pods/…/…/node_modules/react-native/React/FBReactNativeSpec/…/…/scripts/generate-specs.sh: line 27: readlink: command not found /Users/nitin/Downloads/SampleProject/ios/Pods/…/…/node_modules/react-native/React/FBReactNativeSpec/…/…/scripts/generate-specs.sh: line 27: dirname: command not found /Users/nitin/Downloads/SampleProject/ios/Pods/…/…/node_modules/react-native/React/FBReactNativeSpec/…/…/scripts/generate-specs.sh: line 27: cd: : No such file or directory

Command PhaseScriptExecution failed with a nonzero exit code

using xcode 12.5 react-native -v 0.65.1 node -v 14.17.6

React Native version:

react-native -v 0.65.1

Steps To Reproduce

I am using Apple M1 and just init a fresh project react-native init SampleProject

Expected Results

Should Compile

Snack, code example, screenshot, or link to a repository:

Screenshot 1943-06-15 at 2 58 37 PM

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:34

github_iconTop GitHub Comments

19reactions
khanakiacommented, Sep 8, 2021

@laurpantelimon I found the solution after hours of debugging you need to modify this file for now.

  1. Edit this file /node_modules/react-native/React/FBReactNativeSpec/../../scripts/generate-specs.sh
  2. Add this line export PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin
  3. Then run the project using Xcode it will work 100%
5reactions
khanakiacommented, Oct 5, 2021

@hoanganh1712 This is the exact path /node_modules/react-native/scripts/generate-specs.sh or rerun the npm install and check if path exists.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Native 0.64 Command PhaseScriptExecution failed with ...
I found the solution after hours of debugging you need to modify this file for now.
Read more >
please any help Phasescriptexecution error creating new ...
scripts/generate-specs.sh: line 27: cd: : No such file or directory. Command PhaseScriptExecution failed with a nonzero exit code.
Read more >
command phasescriptexecution failed with a ... - You.com
... found /Users/apps/myracnative/node_modules/react-native/scripts/generate-specs.sh: line 27: cd: : No such file or directory Command PhaseScriptExecution ...
Read more >
Xcode 11 Command PhaseScriptExecut… - Apple Developer
I cannot seem to find the solution here or on Stack Overflow. When compiling, I keep getting this error: Command PhaseScriptExecution failed with...
Read more >
How to fix No such file or directoryCommand ... - YouTube
Check video in details to fix such type or error xattr: No such file : xcassetschmod: xcassets: No such file or directorybash: line...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found