Unable to resolve module assert
buffer
events
#21405
Labels
Bug
Resolution: Locked
This issue was locked by the bot.
Tech: Bundler 📦
This issue is related to the bundler (Metro, Haul, etc) used.
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
: Moduleevents
does not exist in the Haste module mapvar buffer = require('buffer')
error: bundling failed: Error: Unable to resolve module
buffer
from/Users/Jonathan/Desktop/00-React/MyKitchen/Classes/Scenes/MongoDBTest/index.js
: Modulebuffer
does not exist in the Haste module mapvar assert = require('assert');
error: bundling failed: Error: Unable to resolve module
assert
from/Users/Jonathan/Desktop/00-React/MyKitchen/Classes/Scenes/MongoDBTest/index.js
: Moduleassert
does not exist in the Haste module mapReproducible Demo
Create a new project:
$ react-native init MyKitchen
add this line in App.js:
var assert = require('assert');
$ react-native run-android
The text was updated successfully, but these errors were encountered: