Boilerplate Troubleshooting

Error: listen EADDRNOTAVAIL 135.16.3.17:4444

In case when running yarn dev or yarn dev-server you see an error similar to this

$ yarn dev-server

> UniversalRelayBoilerplate@3.0.0 dev-server /Users/MyUserName/Projects/UniversalRelayBoilerplate
> better-npm-run dev-server

running better-npm-run in /Users/MyUserName/Projects/UniversalRelayBoilerplate
Executing script: dev-server

to be executed: nodemon --exec ./node_modules/.bin/babel-node -- ./server/server.js
[nodemon] 1.9.1
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `./node_modules/.bin/babel-node ./server/server.js`
babel-relay-plugin-loader: using schema at [/Users/MyUserName/Projects/UniversalRelayBoilerplate/graphql/schema.json]
info: Starting application npm_package_name=UniversalRelayBoilerplate, npm_package_version=3.0.0, NODE_ENV=development,
 ...... HOST=172.31.99.144, PORT=4444, PUBLIC_URL=undefined, process_title=/usr/local/bin/node,
 ...... process_pid=869, objectPersistence=memory
events.js:154
     throw er; // Unhandled 'error' event
     ^

Error: listen EADDRNOTAVAIL 135.16.3.17:4444
   at Object.exports._errnoException (util.js:890:11)
   at exports._exceptionWithHostPort (util.js:913:20)
   at Server._listen2 (net.js:1218:19)
   at listen (net.js:1267:10)
   at net.js:1376:9
   at _combinedTickCallback (node.js:380:13)
   at process._tickDomainCallback (node.js:425:11)
   at Function.Module.runMain (module.js:449:11)
   at /Users/MyUserName/Projects/UniversalRelayBoilerplate/node_modules/babel-cli/lib/_babel-node.js:161:27
   at Object.<anonymous>
    (/Users/MyUserName/Projects/UniversalRelayBoilerplate/node_modules/babel-cli/lib/_babel-node.js:162:7)
[nodemon] app crashed - waiting for file changes before starting...

The reason might be that your IP is configured incorrectly. You can fix this by:

Error: Print: Entry, ":CFBundleIdentifier", Does Not Exist

In order to fix the following error when running react-native for iOS:

Print: Entry, ":CFBundleIdentifier", Does Not Exist
sudo chmod 777 ProjectName
cd ProjectName
sudo react-native run-ios
sudo chmod -R a+w *

The build should succeed, but the application will not be launched. From then on simply use

react-native run-ios

Error: llisten EADDRINUSE 127.0.0.1:4444

In case when running yarn dev or yarn dev-server you see an error similar to this

$ yarn dev-server

> UniversalRelayBoilerplate@3.10.0 dev-server /Users/alex/Documents/Projects/UniversalRelayBoilerplate
> better-npm-run dev-server

running better-npm-run in /Users/alex/Documents/Projects/UniversalRelayBoilerplate
Executing script: dev-server

to be executed: nodemon --exec ./node_modules/.bin/babel-node -- ./server/server.js
[nodemon] 1.9.2
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `./node_modules/.bin/babel-node ./server/server.js`
babel-relay-plugin-loader: using schema at
  [/Users/alex/Documents/Projects/UniversalRelayBoilerplate/graphql/schema.json]
info: Starting application npm_package_name=UniversalRelayBoilerplate, npm_package_version=3.10.0,
NODE_ENV=development, HOST=127.0.0.1, PORT=4444, PUBLIC_URL=http://localhost:4444,
..... process_title=/usr/local/bin/node, process_pid=933, objectPersistence=cassandra,
..... CASSANDRA_KEYSPACE=urb, CASSANDRA_CONNECTION_POINTS=localhost
events.js:154
     throw er; // Unhandled 'error' event
     ^

Error: listen EADDRINUSE 127.0.0.1:4444
   at Object.exports._errnoException (util.js:890:11)
   at exports._exceptionWithHostPort (util.js:913:20)
   at Server._listen2 (net.js:1231:14)
   at listen (net.js:1267:10)
   at net.js:1376:9
   at _combinedTickCallback (node.js:380:13)
   at process._tickDomainCallback (node.js:425:11)
   at Function.Module.runMain (module.js:449:11)
   at /Users/alex/Documents/Projects/UniversalRelayBoilerplate/node_modules/babel-cli/lib/_babel-node.js:171:48
   at Object.<anonymous>
    (/Users/alex/Documents/Projects/UniversalRelayBoilerplate/node_modules/babel-cli/lib/_babel-node.js:172:7)
[nodemon] app crashed - waiting for file changes before starting...

The reason might be that you are already running the application.

Reset watchman

Sometimes watchman gets overloaded with too many files. In order to re-set it, stop all running projects and run

$ watchman watch-del-all

Clean XCode build

Sometimes XCode gets confused when files are updated, and build data has to be deleted. In XCode the build data for all projects is located at:

~/Library/Developer/Xcode/DerivedData

Cassandra

In order to troubleshoot Cassandra issues check Troubleshooting Cassandra.