-
Notifications
You must be signed in to change notification settings - Fork 24.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot find module 'metro/src/blacklist' #21093
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Are you using a custom If yes, you should update the code related to requiring
|
I'm not using a custom rn-cli.config.js. But the one in the project directory looks like this:
|
Maybe you should try to |
I have removed node_modules. But I changed the rn-cli.config.js per your instructions and at least now got the react-native info working. Probably the metro bundler too. Next have to figure out how to resolve the RN issues with XCode 10 GM. Really hate wasting time with fighting with buggy RN... |
You will need to update the rn-cli.config.js per the upgrade guide. https://github.com/react-native-community/react-native-releases/blob/master/CHANGELOG.md#updating-to-this-version see point number 4 change the blacklist import to. |
Whats in the line // ... where alternateRoots should be defined? Would be nice to have the whole file in the guide. |
Also: (node:17719) UnhandledPromiseRejectionWarning: Error: Cannot find module './scripts/transformer.js' |
This is your new file.
|
Sorry, I just realised the blackListing reference is incorrect, it should be. const blacklist = require('metro-config/src/defaults/blacklist')
module.exports = {
resolver: {
blacklistRE: blacklist([/react-native\/local-cli\/core\/__fixtures__.*/]),
},
}; |
I feel that we can close this now, since this is also shown in the changelog for 0.57 https://github.com/react-native-community/react-native-releases/blob/master/CHANGELOG.md#updating-to-this-version |
Environment
React Native Environment Info:
System:
OS: macOS High Sierra 10.13.6
CPU: x64 Intel(R) Core(TM) i7-6567U CPU @ 3.30GHz
Memory: 440.67 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 8.11.3 - /usr/local/opt/node@8/bin/node
Yarn: 1.9.4 - /usr/local/bin/yarn
npm: 5.6.0 - /usr/local/opt/node@8/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.0, macOS 10.14, tvOS 12.0, watchOS 5.0
Android SDK:
Build Tools: 21.1.1, 21.1.2, 22.0.0, 22.0.1, 23.0.1, 23.0.2, 23.0.3, 24.0.1, 25.0.0, 25.0.2, 25.0.3, 26.0.0, 26.0.2, 27.0.3, 28.0.0
API Levels: 22, 24, 26, 27
IDEs:
Android Studio: 3.1 AI-173.4697961
Xcode: 10.0/10A254a - /usr/bin/xcodebuild
npmPackages:
react: 16.5.0 => 16.5.0
react-native: 0.57.0 => 0.57.0
npmGlobalPackages:
react-native-cli: 2.0.1
react-native-git-upgrade: 0.2.7
Description
(node:94806) UnhandledPromiseRejectionWarning: Error: Cannot find module 'metro/src/blacklist'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
The text was updated successfully, but these errors were encountered: