react-native: bundling failed: Error: Unable to resolve module `_wrapObjectFreezeAndFriends` from ` /node_modules/react-native/Libraries/Core/polyfillES6Collections.js`: Module `_wrapObjectFreezeAndFriends` does not exist in the Haste module map

i tried to do all these step and nothing worked

  1. Clear watchman watches: watchman watch-del-all.
  2. Delete the node_modules folder: rm -rf node_modules && npm install.
  3. Reset Metro Bundler cache: rm -rf /tmp/metro-bundler-cache-* or npm start -- --reset-cache.
  4. Remove haste cache: rm -rf /tmp/haste-map-react-native-packager-*.

React Native version: info React Native Environment Info: System: OS: macOS 10.14.3 CPU: (8) x64 Intel® Core™ i7-4770HQ CPU @ 2.20GHz Memory: 46.55 MB / 16.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 9.5.0 - ~/.nvm/versions/node/v9.5.0/bin/node Yarn: 1.6.0 - ~/.nvm/versions/node/v9.5.0/bin/yarn npm: 4.6.1 - ~/.nvm/versions/node/v9.5.0/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman SDKs: Android SDK: API Levels: 21, 22, 23, 24, 25, 26, 27, 28 Build Tools: 23.0.0, 23.0.1, 23.0.2, 23.0.3, 24.0.0, 24.0.1, 25.0.0, 25.0.1, 25.0.2, 25.0.3, 26.0.1, 26.0.2, 26.0.3, 27.0.0, 27.0.1, 27.0.2, 27.0.3, 28.0.0, 28.0.1, 28.0.2, 28.0.3 System Images: a…google_apis | Google APIs Intel x86 Atom Sys…, a…gle_apis | Google APIs Intel x86 Atom_64 …, a… | Android TV Intel x86 Atom Syst…, a…ndroid-wear | Android Wear Intel x86 Atom Sy…, a…google_apis | Google APIs Intel x86 Atom Sys…, a… | Android TV Intel x86 Atom Syst…, a… | Android TV Intel x86 Atom Syst…, a…ndroid-wear | Wear OS Intel x86 Atom System …, a…-28 | Intel x86 Atom, a… | Intel x86 Atom_64, a…gle_apis | Google APIs Intel x86 Atom_64 …, a…s_playstore | Google Play Intel x86 Atom Sys…, a…laystore | Google Play Intel x86 Atom_64 … IDEs: Android Studio: 3.1 AI-173.4819257 Xcode: /undefined - /usr/bin/xcodebuild npmPackages: react: ^16.8.3 => 16.8.6 react-native: ^0.59.9 => 0.59.9 npmGlobalPackages: create-react-native-app: 1.0.0 react-native-create-library: 3.1.2

Steps To Reproduce

1.upgrade from react-native 0.59.5 to react-native 0.59.9

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 3
  • Comments: 20 (1 by maintainers)

Commits related to this issue

Most upvoted comments

problem fixed after restarting my laptop 😀

leaving and reentering my house worked perfectly !!

@frederickjjoubert , Install react-native-clean-project and try.

yarn add -D react-native-clean-project

react-native clean-project-auto

you don’t need to restart for this.

same issue when updating to RN 0.59.10 and even after restarting not working

In case anyone ends up here and doesn’t want to restart their laptop, running rm -rf $TMPDIR/metro-* and watchman watch-del-all were sufficient for me

have just met the same error when updating to RN 0.59.10

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.