我必须为一个uni项目使用VR,为此我安装了React360cli。然后我运行react-360 init Hello360,cd Hello360。所有文件都已安装并完成
问题是当我尝试用npm启动本地服务器时。一旦我输入enter,我就会看到下面是什么,什么都看不到。它卡住了。有人能帮我隔离这个问题吗?
> Hello360@0.0.1 start /Users/kishokanthjeganathan/Documents/Final-Code/VR/Hello360
> node node_modules/react-360/scripts/packager.js
open browser at http://localhost:8081/index.html
Starting React Native Packager...
┌──────────────────────────────────────────────────────────────────────────────┐
│ │
│ Running Metro Bundler on port 8081. │
│ │
│ Keep Metro running while developing on any JS projects. Feel free to │
│ close this tab and run your own Metro instance if you prefer. │
│ │
│ https://github.com/facebook/react-native │
│ │
└──────────────────────────────────────────────────────────────────────────────┘
Looking for JS files in
/Users/kishokanthjeganathan/Documents/Final-Code/VR/Hello360
Metro Bundler ready.
Loading dependency graph...(node:8286) UnhandledPromiseRejectionWarning: Error: `fsevents` unavailable (this watcher can only be used on Darwin)
at new FSEventsWatcher (/Users/kishokanthjeganathan/Documents/Final-Code/VR/Hello360/node_modules/sane/src/fsevents_watcher.js:41:11)
at createWatcher (/Users/kishokanthjeganathan/Documents/Final-Code/VR/Hello360/node_modules/jest-haste-map/build/index.js:572:23)
at Array.map (<anonymous>)
at HasteMap._watch (/Users/kishokanthjeganathan/Documents/Final-Code/VR/Hello360/node_modules/jest-haste-map/build/index.js:683:44)
at /Users/kishokanthjeganathan/Documents/Final-Code/VR/Hello360/node_modules/jest-haste-map/build/index.js:280:21
at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:8286) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:8286) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
在此处找到解决方案。希望这能有所帮助!
https://github.com/expo/expo/issues/854#issuecomment-343243804