在React Native最新版本中创建的应用无法正常运行

时间:2019-02-08 07:23:39

标签: reactjs react-native

我是本机反应的新手。我正在使用这些版本。

react-native-cli: 2.0.1
react-native: 0.58.4

创建应用后
react-native init cameraapp

它创建了一个文件夹cameraapp。现在,当我在cameraapp文件夹中运行时,启动模拟器之后。

react-native run-android

我收到此错误消息。未定义的地图。

这是下面的堆栈跟踪

Loading dependency graph, done.
 DELTA  [android, dev] ..\..\../index.js ▓▓▓▓▓▓▓▓▓░░░░░░░ 60.8% (403/517)::ffff:127.0.0.1 - - [08/Feb/2019:07:19:16 +0000] "GET /index.delta?platform=android&dev=true&minify=false HTTP/1.1" 500 - "-" "okhttp/3.12.1"
error: bundling failed: TypeError: Cannot read property 'map' of undefined
    at resolveDependencies (D:\Training\react native\cameraapp\node_modules\metro\src\DeltaBundler\traverseDependencies.js:388:18)
    at D:\Training\react native\cameraapp\node_modules\metro\src\DeltaBundler\traverseDependencies.js:261:33
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (D:\Training\react native\cameraapp\node_modules\metro\src\DeltaBundler\traverseDependencies.js:87:24)
    at _next (D:\Training\react native\cameraapp\node_modules\metro\src\DeltaBundler\traverseDependencies.js:107:9)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

enter image description here enter image description here

注意:我尚未编辑此应用程序。创建后才从命令行启动。

0 个答案:

没有答案