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.

Command PhaseScriptExecution failed with a nonzero exit cod In Apple m1 machine

See original GitHub issue

Description

Hello Folks,

Creating new react native project in apple m1 machine in “0.67.1” version, and my iOS project always getting failed to run getting this error.

node:internal/fs/utils:343
    throw err;
    ^

Error: ENOENT: no such file or directory, lstat 'Project/MobileCodeChallenge/ios/Pods/../../node_modules/react-native/React/FBReactNativeSpec/../../Libraries/Vibration/NativeVibration.js'
    at Object.lstatSync (node:fs:1504:3)
    at /Users/pradeeppradeep/Documents/All Project/MobileCodeChallenge/node_modules/react-native-codegen/lib/cli/combine/combine-js-to-schema-cli.js:82:10
    at Array.forEach (<anonymous>)
    at Object.<anonymous> (/Users/pradeeppradeep/Documents/All Project/MobileCodeChallenge/node_modules/react-native-codegen/lib/cli/combine/combine-js-to-schema-cli.js:81:10)
    at Module._compile (node:internal/modules/cjs/loader:1095:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1124:10)
    at Module.load (node:internal/modules/cjs/loader:975:32)
    at Function.Module._load (node:internal/modules/cjs/loader:816:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:79:12)
    at node:internal/main/run_main_module:17:47 {
  errno: -2,
  syscall: 'lstat',
  code: 'ENOENT',
  path: 'Project/MobileCodeChallenge/ios/Pods/../../node_modules/react-native/React/FBReactNativeSpec/../../Libraries/Vibration/NativeVibration.js'
}
Command PhaseScriptExecution failed with a nonzero exit code

Version

0.67.1

Output of npx react-native info

System: OS: macOS 11.4 CPU: (8) x64 Apple M1 Memory: 44.86 MB / 8.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 16.5.0 - /usr/local/bin/node Yarn: Not Found npm: 8.3.2 - /usr/local/bin/npm Watchman: 2021.06.07.00 - /usr/local/bin/watchman Managers: CocoaPods: 1.11.2 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.0.1, iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0 Android SDK: API Levels: 29, 30, 31 Build Tools: 28.0.3, 29.0.2, 30.0.2, 31.0.0 System Images: android-30 | Google APIs Intel x86 Atom Android NDK: Not Found IDEs: Android Studio: 4.2 AI-202.7660.26.42.7486908 Xcode: 13.1/13A1030d - /usr/bin/xcodebuild Languages: Java: 1.8.0_292 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 17.0.2 => 17.0.2 react-native: 0.67.1 => 0.67.1 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found

Steps to reproduce

1 :- Create new react-native project with the help of npx react-native init AwesomeProject 2 :- Try to run this project in iOS by Xcode and getting this error.

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

No response

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:11
  • Comments:16

github_iconTop GitHub Comments

9reactions
Axenucommented, Apr 21, 2022

So this might be totally unrelated, but my problem was that I hade a project folder with a space in the name which appears to be the problem. Some change in react native seems to be unable to handle a path with a space in the directory name (Which should be considered bad practice anyway). Hope it can help someone

6reactions
adil2166commented, Feb 2, 2022

same issue with mac mini m1 and macbook pro m1 Is there any solution ? react native 0.67.1 and 0.67.2 are not working as i am creating new project i am using xcode 13.2.1

Read more comments on GitHub >

github_iconTop Results From Across the Web

Xcode 11 Command PhaseScriptExecut… - Apple Developer
When compiling, I keep getting this error: Command PhaseScriptExecution failed with a nonzero exit code. I tried in Xcode. Xcode > Preferences >...
Read more >
Command PhaseScriptExecution failed with a nonzero exit ...
When running the Flutter project from VS Code it works fine. When trying to run it from Xcode getting this error. I have...
Read more >
How to fix "Command PhaseScriptExecution failed with a ...
How to fix " Command PhaseScriptExecution failed with a nonzero exit code " on Xcode.
Read more >
m1 command phasescriptexecution failed with a nonzero exit ...
Command PhaseScriptExecution failed with a nonzero exit code in M1 ... Creating new react native project in apple m1 machine in "0.67.1" version, ......
Read more >
How to Fix Xcode Command PhaseScriptExecution failed with ...
The Xcode 11 “Command PhaseScriptExecution failed with a nonzero exit code” error message can be concerning for developers.
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