我必须为一个uni项目做一些虚拟现实的工作,为此我安装了React360 cli。然后我运行了react-360 init Hello360,cd Hello360。这些文件都已安装,并且完好无损
问题出在我尝试使用npm start启动本地服务器时。一旦我键入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.发布于 2020-07-24 05:27:31
在这里找到了解决方案。希望这能有所帮助!
https://github.com/expo/expo/issues/854#issuecomment-343243804
https://stackoverflow.com/questions/63062410
复制相似问题