🚇 The JavaScript bundler for React Native. https://facebook.github.io/metro
Go to file
Sebastian Bargmann 29c6548961 Run packager.sh using '.' instead of 'source'.
Summary:
'source' is not available in all shells on Linux (e.g. dash) and will silently fail launchPackager.command when called from runAndroid.js.

react-native run-android will thus silently fail to start the developement server ('JS server').

What existing problem does the pull request solve?

When running "react-native run-android" on the below reasonably vanilla Ubuntu system, the development server / packager script fails to start. It fails because sh defaults to dash (not bash) which doesn't know the command 'source'. dot (.) does the same as source, but works in all shells.

$ uname -a
Linux dallas 4.8.0-52-generic #55~16.04.1-Ubuntu SMP Fri Apr 28 14:36:29 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

$ which sh
/bin/sh

$ readlink -f /bin/sh
/bin/dash

react-native-cli: 2.0.1
react-native: 0.44.0

$ ps aux | grep packager
(nothing)

ps aux | grep packager
sh /home/xxx/code/react-native/AwesomeProject/node_modules/react-native/packager/launchPackager.command
node /home/xxx/code/react-native/AwesomeProject/node_modules/react-native/packager/../local-cli/cli.js start
Closes https://github.com/facebook/react-native/pull/14040

Differential Revision: D5096298

Pulled By: hramos

fbshipit-source-id: 88466e802c9bc4358840391edb37e153f0a6b1f7
2017-05-19 14:51:27 -07:00
.github Initial repository structure. 2017-01-26 12:56:40 +00:00
flow-typed Initial repository structure. 2017-01-26 12:56:40 +00:00
packages Run packager.sh using '.' instead of 'source'. 2017-05-19 14:51:27 -07:00
scripts Make most tests work. 2017-04-11 19:19:25 +01:00
.babelrc Fixes. 2017-04-11 18:14:32 +01:00
.eslintignore Initial repository structure. 2017-01-26 12:56:40 +00:00
.eslintrc Repo updates. 2017-02-28 11:45:45 +00:00
.flowconfig Update flow. 2017-04-11 18:22:31 +01:00
.gitignore Use Yarn with lerna. 2017-03-01 11:01:35 +00:00
.npmignore Initial repository structure. 2017-01-26 12:56:40 +00:00
.travis.yml Initial repository structure. 2017-01-26 12:56:40 +00:00
CHANGELOG.md Initial repository structure. 2017-01-26 12:56:40 +00:00
CONTRIBUTING.md Initial repository structure. 2017-01-26 12:56:40 +00:00
LICENSE Initial repository structure. 2017-01-26 12:56:40 +00:00
PATENTS Initial repository structure. 2017-01-26 12:56:40 +00:00
README.md Initial repository structure. 2017-01-26 12:56:40 +00:00
appveyor.yml Initial repository structure. 2017-01-26 12:56:40 +00:00
lerna.json Use Yarn with lerna. 2017-03-01 11:01:35 +00:00
package.json Make most tests work. 2017-04-11 19:19:25 +01:00
yarn.lock Make most tests work. 2017-04-11 19:19:25 +01:00

README.md

metro-bundler Build Status Windows Build Status npm version

The JavaScript bundler for React Native