我正在尝试运行我的第一个react本机项目,但出现错误
无法获取批处理桥,请确保您的包捆绑正确
请帮助我修复它-正在使用Windows计算机
最佳答案
我也有同样的问题。对于项目文件夹中的解决方案,请执行以下步骤:
react-native start
这可能需要一段时间。输出如下:
Scanning 581 folders for symlinks in /home/shantanu/react-native/AwesomeProject/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
/home/shantanu/react-native/AwesomeProject
[10/3/2016, 12:49:34 PM] <START> Building Dependency Graph
[10/3/2016, 12:49:34 PM] <START> Crawling File System
[Hot Module Replacement] Server listening on /hot
React packager ready.
[10/3/2016, 12:49:47 PM] <END> Crawling File System (12440ms)
[10/3/2016, 12:49:47 PM] <START> Building in-memory fs for JavaScript
[10/3/2016, 12:49:47 PM] <END> Building in-memory fs for JavaScript (123ms)
[10/3/2016, 12:49:47 PM] <START> Building in-memory fs for Assets
[10/3/2016, 12:49:47 PM] <END> Building in-memory fs for Assets (90ms)
[10/3/2016, 12:49:47 PM] <START> Building Haste Map
[10/3/2016, 12:49:47 PM] <START> Building (deprecated) Asset Map
[10/3/2016, 12:49:47 PM] <END> Building (deprecated) Asset Map (38ms)
[10/3/2016, 12:49:47 PM] <END> Building Haste Map (773ms)
[10/3/2016, 12:49:47 PM] <END> Building Dependency Graph (13551ms)
^[[B
[10/3/2016, 12:50:35 PM] <START> Requesting bundle: {"url":"/index.android.bundle?platform=android&dev=true&hot=false&minify=false"}
[10/3/2016, 12:50:35 PM] <START> Finding dependencies
transformed 636/636 (100%)
[10/3/2016, 12:50:45 PM] <END> Finding dependencies (9503ms)
[10/3/2016, 12:50:48 PM] <END> Requesting bundle: {"url":"/index.android.bundle?platform=android&dev=true&hot=false&minify=false"} (13130ms)
一旦结束,请运行以下命令:
react-native run-android