PhaseScriptExecution error generate-specs.sh: line 27: cd: : No such file or directory
See original GitHub issuePlease 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:
Issue Analytics
- State:
- Created 2 years ago
- Comments:34
Top GitHub Comments
@laurpantelimon I found the solution after hours of debugging you need to modify this file for now.
/node_modules/react-native/React/FBReactNativeSpec/../../scripts/generate-specs.sh
export PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin
@hoanganh1712 This is the exact path
/node_modules/react-native/scripts/generate-specs.sh
or rerun thenpm install
and check if path exists.