Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting Started Guide - Cannot run new project #14109

Closed
sbodi10 opened this issue May 22, 2017 · 3 comments
Closed

Getting Started Guide - Cannot run new project #14109

sbodi10 opened this issue May 22, 2017 · 3 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@sbodi10
Copy link

sbodi10 commented May 22, 2017

Description

After followed the Getting Started guide, I am unable to run the starter application. When I run the command react-native run-ios, I receive the following error:

"
Port 8081 already in use, packager is either not running or not running correctly

Command /bin/sh failed with exit code 2



** BUILD FAILED **


The following build commands failed:

	PhaseScriptExecution Start\ Packager /Users/bodiwals/Documents/Code/Bitbucket/HappyJar/ios/build/Build/Intermediates/React.build/Debug-iphonesimulator/React.build/Script-006B79A01A781F38006873D1.sh
(1 failure)

Installing build/Build/Products/Debug-iphonesimulator/HappyJar.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
Print: Entry, ":CFBundleIdentifier", Does Not Exist

Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/HappyJar.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
"

I believe that is because my machine is running McAfee in the background on port 8081.

I then tried running the following command:
react-native start --port=8088, but then my terminal gets stuck on "Loading dependency graph, done."

Reproduction Steps and Sample Code

I followed the Getting Started guide. I've installed nodejs, using version 6.9.4. I've installed watchman, the react-native-cli tool, and used the command react-native init myProject to create a project. I went into the directory and tried running react-native run-ios and ran into the issue I provided above. I then ran react-native start --port=8088 and got stuck as provided above. I've looked all over stackoverflow, but have not been able to find a solution to this issue.

Solution

Get the demo project up and running.

Additional Information

  • React-Native-Cli: 2.0.1
  • React-Native: 0.44.0
  • Platform: iOS
  • Development Operating System: macOS (Sierra - 10.12.3)
@hramos
Copy link
Contributor

hramos commented May 22, 2017

This is covered in the Troubleshooting guide. You'll need to update the native iOS app to use 8088 as well. You can search for references to 8081 in the code using your editor of choice.

Search for 8081 in your project folder, and update the reference within the React.build script to use your port of choice.

@hramos hramos closed this as completed May 22, 2017
@hramos
Copy link
Contributor

hramos commented Aug 4, 2017

Duplicate of #14423

@hramos hramos marked this as a duplicate of #14423 Aug 4, 2017
@elieajaltouni
Copy link

Hi,
I have searched my project replaced every occurrence of 8081 by 8082.
The files I changed are RTCBridgeDelegate.h, RTCBundleURLProvider.m, RTCInspectorDevServerHelper.mm, RCTPackagerConnectionBridgeConfig.h and RCTWebSocketExecutor.h. Cleaned the Xcode project rebuilt it. Changed the package.json
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start --port 8082",
"test": "jest"
},
and still when I launch the project it starts on port 8081. Any ideas? Thanks!

@facebook facebook locked as resolved and limited conversation to collaborators May 24, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

4 participants