--- Delete everything above this line before submitting your issue ---
Bug
Running npm start starts a server at localhost:8081.
No server has started on localhost:8081.
Running through all the steps from Getting Started, I get the following warnings during the yarn install:
warning react-native > [email protected]: connect 2.x series is deprecated
warning react-native > xcode > [email protected]: Use uuid module instead
warning react-devtools > electron > electron-download > nugget > progress-stream > through2 > xtend > [email protected]:
From there, running npm start logs the open browser at http://localhost:8081/vr/ to the console, but it never starts the server (lsof -n -i4TCP:8081 comes up nilβthe port isnβt in use).
The console just hangs after printing that to the console. I tried manually calling node node_modules/react-native/local-cli/cli.js start, but that does the same thingβit just hangs with no error output.
Thereβs probably some missing install instructions (Iβve never used React Native before, so assume I havenβt done any set up for that), or there is an error deep within an NPM package (React Native?) thatβs not bubbling up to my console. Iβd love to troubleshoot, but I canβt go down the node_modules rabbit hole if the point of react-vr-cli was to abstract all of this out of my control.
1.4.01.4.08.4.00.27.5Can you copy everything that gets printed out when you run npm start?
Also, just try completely deleting the node_modules directory in your project and re-running npm install or yarn. There are no known issues at this time with any of the versions you printed above, so I can't provide much help without more info.
> [email protected] start /Users/drew/sites/WelcomeToVR
> node -e "console.log('open browser at http://localhost:8081/vr/\n\n');" && node node_modules/react-native/local-cli/cli.js start
open browser at http://localhost:8081/vr/
β¦thatβs it. Nothing else. Still doesnβt start the server. Thatβs on a clean install just now.
Do you have watchman installed? It shouldn't be necessary for everyone, but I do find that in odd cases where the server acts up, installing it tends to help.
You can learn more here: http://facebook.github.io/react-native/docs/getting-started.html#node-watchman
Ooh! Good suggestion. I got something:
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Running packager on port 8081. β
β β
β Keep this packager running while developing on any JS projects. Feel β
β free to close this tab and run your own packager instance if you β
β prefer. β
β β
β https://github.com/facebook/react-native β
β β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Looking for JS files in
/Users/drew/sites/WelcomeToVR
Loading dependency graph...
React packager ready.
ERROR: Unknown option --no-pretty
Watchman: watchman --no-pretty get-sockname returned with exit code=1, signal=null, stderr= ERROR: Unknown option --no-pretty
jest-haste-map: Watchman crawl failed. Retrying once with node crawler.
Usually this happens when watchman isn't running. Create an empty `.watchmanconfig` file in your project's root folder or initialize a git or hg repository in your project.
Error: watchman --no-pretty get-sockname returned with exit code=1, signal=null, stderr= ERROR: Unknown option --no-pretty
jest-haste-map: @providesModule naming collision:
Duplicate module name: View
Paths: /Users/drew/sites/WelcomeToVR/node_modules/react-vr/Libraries/Components/View/View.vr.js collides with /Users/drew/sites/WelcomeToVR/node_modules/react-native/Libraries/Components/View/View.js
This warning is caused by a @providesModule declaration with the same name across two different files.
jest-haste-map: @providesModule naming collision:
Duplicate module name: LayoutPropTypes
Paths: /Users/drew/sites/WelcomeToVR/node_modules/react-vr/Libraries/StyleSheet/LayoutPropTypes.vr.js collides with /Users/drew/sites/WelcomeToVR/node_modules/react-native/Libraries/StyleSheet/LayoutPropTypes.js
This warning is caused by a @providesModule declaration with the same name across two different files.
jest-haste-map: @providesModule naming collision:
Duplicate module name: NetworkOverlay
Paths: /Users/drew/sites/WelcomeToVR/node_modules/react-vr/Libraries/VRReactOverrides/NetworkOverlay.vr.js collides with /Users/drew/sites/WelcomeToVR/node_modules/react-native/Libraries/Inspector/NetworkOverlay.js
This warning is caused by a @providesModule declaration with the same name across two different files.
jest-haste-map: @providesModule naming collision:
Duplicate module name: AnimatedImplementation
Paths: /Users/drew/sites/WelcomeToVR/node_modules/react-vr/Libraries/VRReactOverrides/AnimatedImplementation.vr.js collides with /Users/drew/sites/WelcomeToVR/node_modules/react-native/Libraries/Animated/src/AnimatedImplementation.js
This warning is caused by a @providesModule declaration with the same name across two different files.
jest-haste-map: @providesModule naming collision:
Duplicate module name: NavigationExperimental
Paths: /Users/drew/sites/WelcomeToVR/node_modules/react-vr/Libraries/VRReactOverrides/PlatformSpecific/NavigationExperimental.vr.js collides with /Users/drew/sites/WelcomeToVR/node_modules/react-native/Libraries/NavigationExperimental/NavigationExperimental.js
This warning is caused by a @providesModule declaration with the same name across two different files.
jest-haste-map: @providesModule naming collision:
Duplicate module name: setupDevtools
Paths: /Users/drew/sites/WelcomeToVR/node_modules/react-vr/Libraries/VRReactOverrides/setupDevtools.vr.js collides with /Users/drew/sites/WelcomeToVR/node_modules/react-native/Libraries/Core/Devtools/setupDevtools.js
This warning is caused by a @providesModule declaration with the same name across two different files.
jest-haste-map: @providesModule naming collision:
Duplicate module name: processTransform
Paths: /Users/drew/sites/WelcomeToVR/node_modules/react-vr/Libraries/VRReactOverrides/processTransform.vr.js collides with /Users/drew/sites/WelcomeToVR/node_modules/react-native/Libraries/StyleSheet/processTransform.js
This warning is caused by a @providesModule declaration with the same name across two different files.
jest-haste-map: @providesModule naming collision:
Duplicate module name: Text
Paths: /Users/drew/sites/WelcomeToVR/node_modules/react-vr/Libraries/VRReactOverrides/Text.vr.js collides with /Users/drew/sites/WelcomeToVR/node_modules/react-native/Libraries/Text/Text.js
This warning is caused by a @providesModule declaration with the same name across two different files.
jest-haste-map: @providesModule naming collision:
Duplicate module name: ReactNativeViewAttributes
Paths: /Users/drew/sites/WelcomeToVR/node_modules/react-vr/Libraries/VRReactOverrides/ReactNativeViewAttributes.vr.js collides with /Users/drew/sites/WelcomeToVR/node_modules/react-native/Libraries/Components/View/ReactNativeViewAttributes.js
This warning is caused by a @providesModule declaration with the same name across two different files.
jest-haste-map: @providesModule naming collision:
Duplicate module name: YellowBox
Paths: /Users/drew/sites/WelcomeToVR/node_modules/react-vr/Libraries/VRReactOverrides/YellowBox.vr.js collides with /Users/drew/sites/WelcomeToVR/node_modules/react-native/Libraries/ReactNative/YellowBox.js
This warning is caused by a @providesModule declaration with the same name across two different files.
jest-haste-map: @providesModule naming collision:
Duplicate module name: TransformPropTypes
Paths: /Users/drew/sites/WelcomeToVR/node_modules/react-vr/Libraries/VRReactOverrides/TransformPropTypes.vr.js collides with /Users/drew/sites/WelcomeToVR/node_modules/react-native/Libraries/StyleSheet/TransformPropTypes.js
This warning is caused by a @providesModule declaration with the same name across two different files.
ERROR: Unknown option --no-pretty
Watchman: watchman --no-pretty get-sockname returned with exit code=1, signal=null, stderr= ERROR: Unknown option --no-pretty
ERROR watchman --no-pretty get-sockname returned with exit code=1, signal=null, stderr= ERROR: Unknown option --no-pretty
Error: watchman --no-pretty get-sockname returned with exit code=1, signal=null, stderr= ERROR: Unknown option --no-pretty
at ChildProcess.<anonymous> (/Users/drew/sites/WelcomeToVR/node_modules/fb-watchman/index.js:198:18)
at emitTwo (events.js:125:13)
at ChildProcess.emit (events.js:213:7)
at maybeClose (internal/child_process.js:927:16)
at Socket.stream.socket.on (internal/child_process.js:348:11)
at emitOne (events.js:115:13)
at Socket.emit (events.js:210:7)
at Pipe._handle.close [as _onclose] (net.js:545:12)
See http://facebook.github.io/react-native/docs/troubleshooting.html
for common problems and solutions.
npm ERR! code ELIFECYCLE
npm ERR! errno 11
npm ERR! [email protected] start: `node -e "console.log('open browser at http://localhost:8081/vr/\n\n');" && node node_modules/react-native/local-cli/cli.js start`
npm ERR! Exit status 11
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/drew/.npm/_logs/2017-08-28T19_21_57_788Z-debug.log
I've ran into this on RN in the past (the watchman errors in your latest comment), there's an issue with _a_ fix, hope it helps!
@breadadams That worked, thanks!
My issue was a corrupted or old watchman (not sure which) installed on my machine with Homebrew I must have forgotten about. Uninstalling watchman completely seems to have fixed this issue for me:
brew uninstall watchman
npm r -g watchman
Conversely, re-installing watchman (4.9.0) seems to be OK, too. The strange part for me was it wasnβt being vocal.
To get that output above, I installed watchman with npm i -g watchman. That must have triggered the conflicting watchman bug from that RN issue @breadadams referenced. But again, whatever watchman version I had installed with Homebrew (I didnβt catch what version it was when it uninstalled) was silently failing.
I believe the issue is fixed.
Most helpful comment
@breadadams That worked, thanks!
My issue was a corrupted or old watchman (not sure which) installed on my machine with Homebrew I must have forgotten about. Uninstalling watchman completely seems to have fixed this issue for me:
Conversely, re-installing watchman (
4.9.0) seems to be OK, too. The strange part for me was it wasnβt being vocal.