AJDee
AJDee

Reputation: 147

How do I build and run React Native Project on new MacBook in Xcode?

I am having issues attempting to run my React Native project on my new MacBook Pro. I transferred the project from my old MacBook and downloaded Xcode but I get the following error when trying to run the project.

"%HOME_DIRECTORY%/node_modules/react-native/scripts/generate-specs.sh: No such file or directory Command PhaseScriptExecution failed with a nonzero exit code"

I have installed Homebrew, Watchman and ran pod install but the project is not launching in Xcode.

Can someone please assist?

Thanks.

Upvotes: 0

Views: 528

Answers (1)

four-eyes
four-eyes

Reputation: 12394

Look at your package.json file. There are a lot of dependencies in there. They must be installed. If there is no node_modules folder, where your package.json is located, they are not installed.

Installing the dependencies can be done by running yarn install or npm install, depending what package manager you use. Make sure you are in the folder where your package.json is located. Clean your Build Folder from Xcode and run it again. It should work.

Upvotes: 1

Related Questions