facebookarchive / react-360

Create amazing 360 and VR content using React
https://facebook.github.io/react-360
Other
8.73k stars 1.23k forks source link

Error running demo server and samples #71

Closed imeckler closed 7 years ago

imeckler commented 7 years ago

We use GitHub Issues for bugs and support tracking for the preview

--- Please use this template, and delete everything above this line before submitting your issue ---

Description

I downloaded the preview zip, npm install, and when I run npm start things poop out.

Expected behavior

The demo server to run.

Actual behavior

I run npm install and get

> undefined postinstall /Users/izzy/Downloads/preview
> node scripts/postinstall.js

npm WARN react-native@0.37.0 requires a peer of react@~15.3.1 but none was installed.
npm WARN react-vr@0.1.6 requires a peer of react-native@~0.42.0 but none was installed.
npm WARN react-vr-web@0.1.6 requires a peer of react-native@~0.42.0 but none was installed.

which I guess is a bit of a bad sign.

Then when I run npm start I get


> @ prestart /Users/izzy/Downloads/preview
> node -e "try{require('fs').statSync('node_modules')}catch(e){process.exit(1)}" || npm install

> @ start /Users/izzy/Downloads/preview
> node node_modules/react-native/local-cli/cli.js start --root .

(node:17326) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
Scanning 635 folders for symlinks in /Users/izzy/Downloads/preview/node_modules (5ms)
 ┌────────────────────────────────────────────────────────────────────────────┐
 │  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/izzy/Downloads/preview
   /Users/izzy/Downloads/preview

[Hot Module Replacement] Server listening on /hot

React packager ready.

2017-03-14 23:01 node[17326] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
2017-03-14 23:01 node[17326] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
2017-03-14 23:01 node[17326] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
2017-03-14 23:01 node[17326] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
2017-03-14 23:01 node[17326] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
2017-03-14 23:01 node[17326] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
2017-03-14 23:01 node[17326] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
2017-03-14 23:01 node[17326] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
2017-03-14 23:01 node[17326] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
2017-03-14 23:01 node[17326] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
2017-03-14 23:01 node[17326] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
2017-03-14 23:01 node[17326] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
2017-03-14 23:01 node[17326] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
 ERROR  Error watching file for changes: EMFILE
{"code":"EMFILE","errno":"EMFILE","syscall":"Error watching file for changes:","filename":null}
Error: Error watching file for changes: EMFILE
    at exports._errnoException (util.js:1033:11)
    at FSEvent.FSWatcher._handle.onchange (fs.js:1375:11)

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! @ start: `node node_modules/react-native/local-cli/cli.js start --root .`
npm ERR! Exit status 11
npm ERR!
npm ERR! Failed at the @ start script 'node node_modules/react-native/local-cli/cli.js start --root .'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the  package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node node_modules/react-native/local-cli/cli.js start --root .
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls
npm ERR! There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/izzy/.npm/_logs/2017-03-15T06_01_16_927Z-debug.log

Additional Information

• Mac 10.12.2 • node 7.7.2 • npm 4.4.1

abritinthebay commented 7 years ago

Same issue - can be fixed by just doing npm i react-native@0.42.0 react@15.4.1

These both really should be deps not peer deps

abritinthebay commented 7 years ago

However this causes a follow up error when trying to run any of the samples:

Bundling `Samples/TourSample/vr/client.js`
  Analysing...Error: Unrecognized platform: vr
    at DependencyGraph._getRequestPlatform (/Users/uname/git/react-vr/node_modules/react-native/packager/src/node-haste/index.js:334:13)
    at load.then (/Users/uname/git/react-vr/node_modules/react-native/packager/src/node-haste/index.js:294:23)
    at process._tickCallback (internal/process/next_tick.js:103:7)
(node:39460) UnhandledPromiseRejectionW
amberroy commented 7 years ago

Looks like you're getting the previous version of our preview zip and there's a mismatch with our latest npm packages, thanks for reporting, we'll fix this shortly.

amberroy commented 7 years ago

This should be fixed, please try downloading the preview zip again.

Fischaela commented 7 years ago

I am getting the same errors when installing React VR with npm. Here's the package.json:

{
  "name": "GDVR_REACTVR_SITEPOINTDEMO",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node -e \"console.log('open browser at http:/localhost:8081/vr/\\n\\n');\" && node node_modules/react-native/local-cli/cli.js start",
    "bundle": "node node_modules/react-vr/scripts/bundle.js",
    "open": "node -e \"require('xopen')('http://localhost:8081/vr/')\"",
    "postinstall": "node postinstall.js && echo done"
  },
  "dependencies": {
    "ovrui": "~0.1.0",
    "ovr-audio": "~0.1.0",
    "react": "15.3.2",
    "react-native": "0.37.0",
    "three": "^0.80.1",
    "react-vr": "~0.1.0",
    "react-vr-web": "~0.1.0",
    "xopen": "1.0.0"
  }
}
amberroy commented 7 years ago

Try deleting the node_modules and re-install using

"react": "15.4.1",
"react-native": "0.42.0",
trigun539 commented 7 years ago

Can anyone tell me if I can actually run this on mac? I have been able to get the samples downloaded and the server starts, however not sure which browser or what extra things/settings I need to configure to be able to see the samples.

Using Oculus Rift DK2 on mac. Tried Firefox nightly, chrome canary, chrome, firefox, chromium. Does anybody have a link I could use?

amberroy commented 7 years ago

the React VR samples will run on mac in a standard web browser, however support for DK2 on Mac, as well as OS X support for the Oculus Rift, was discontinued in 2015. (see Powering the Rift)