-
Notifications
You must be signed in to change notification settings - Fork 24.8k
Description
- Review the documentation: https://facebook.github.io/react-native
- Search for existing issues: https://github.com/facebook/react-native/issues
- Use the latest React Native release: https://github.com/facebook/react-native/releases
Environment
React Native Environment Info:
System:
OS: OS X El Capitan 10.11.6
CPU: x64 Intel(R) Core(TM)2 Duo CPU E8335 @ 2.66GHz
Memory: 244.53 MB / 6.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.11.0 - /usr/local/bin/node
npm: 6.4.1 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 10.2, macOS 10.12, tvOS 10.1, watchOS 3.1
Android SDK:
Build Tools: 22.0.1, 25.0.0, 25.0.3, 26.0.1, 26.0.2, 26.0.3, 27.0.1, 27.0.3, 28.0.1
API Levels: 23, 24, 26, 27
IDEs:
Android Studio: 3.1 AI-173.4819257
Xcode: 8.2.1/8C1002 - /usr/bin/xcodebuild
npmPackages:
react: 16.5.0 => 16.5.0
react-native: 0.57.1 => 0.57.1
npmGlobalPackages:
create-react-native-app: 2.0.2
react-native-cli: 2.0.1
react-native-git-upgrade: 0.2.7
Description
var EventEmitter = require('events').EventEmitter;
error: bundling failed: Error: Unable to resolve module events
from /Users/Jonathan/Desktop/00-React/MyKitchen/Classes/Scenes/MongoDBTest/index.js
: Module events
does not exist in the Haste module map
var buffer = require('buffer')
error: bundling failed: Error: Unable to resolve module buffer
from /Users/Jonathan/Desktop/00-React/MyKitchen/Classes/Scenes/MongoDBTest/index.js
: Module buffer
does not exist in the Haste module map
var assert = require('assert');
error: bundling failed: Error: Unable to resolve module assert
from /Users/Jonathan/Desktop/00-React/MyKitchen/Classes/Scenes/MongoDBTest/index.js
: Module assert
does not exist in the Haste module map
Reproducible Demo
Create a new project:
$ react-native init MyKitchen
add this line in App.js:
var assert = require('assert');
$ react-native run-android