Skip to content

[0.57.0-rc.0] Error: Cannot find module 'metro/src/blacklist' on any react-native cli cmd #20799

Closed
@fungilation

Description

@fungilation

Environment

  React Native Environment Info:
    System:
      OS: Windows 10
      CPU: x64 Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz
      Memory: 8.52 GB / 15.95 GB
    Binaries:
      Yarn: 1.9.4 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
      npm: 6.4.0 - C:\Program Files\nodejs\npm.CMD

Description

Reproducible Demo

Running react-native upgrade or react-native run-android, I get

PS C:\Users\Gary\Documents\code\WonderSwipe> react-native upgrade
Scanning folders for symlinks in C:\Users\Gary\Documents\code\WonderSwipe\node_modules (28ms)
(node:16936) UnhandledPromiseRejectionWarning: Error: Cannot find module 'metro/src/blacklist'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
    at Function.Module._load (internal/modules/cjs/loader.js:507:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (C:\Users\Gary\Documents\code\WonderSwipe\rn-cli.config.js:3:19)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Module._compile (C:\Users\Gary\Documents\code\WonderSwipe\node_modules\pirates\lib\index.js:83:24)
    at Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Object.newLoader [as .js] (C:\Users\Gary\Documents\code\WonderSwipe\node_modules\pirates\lib\index.js:88:7)
    at Module.load (internal/modules/cjs/loader.js:599:32)
(node:16936) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:16936) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Note that I ran yarn add [email protected] from RN 0.56.0 first, before react-native upgrade. react-native run-android is after I've manually upgraded. More details of other steps I took on hitting the metro blacklist error on #20710.

Unsure if possibly related to #20712.

My package.json
{
  "name": "wonderswipe",
  "version": "0.0.1",
  "private": true,
  "eslintConfig": {
    "parserOptions": {
      "ecmaVersion": 7,
      "sourceType": "module",
      "ecmaFeatures": {
        "jsx": true
      }
    },
    "env": {
      "browser": true,
      "node": true
    },
    "plugins": [
      "react",
      "react-native"
    ],
    "rules": {
      "comma-dangle": [
        2,
        "always-multiline"
      ],
      "semi": [
        2,
        "never"
      ],
      "react-native/no-unused-styles": 2,
      "react-native/split-platform-components": 2
    }
  },
  "scripts": {
    "start": "node node_modules/react-native/local-cli/cli.js start"
  },
  "dependencies": {
    "babel-plugin-idx": "^2",
    "he": "^1.1.0",
    "lodash": "^4.17.2",
    "moment": "^2.19.0",
    "moment-timezone": "^0.5.10",
    "node-summary": "../node-summary",
    "react": "16.4.1",
    "react-native": "0.57.0-rc.0",
    "react-native-actionsheet": "^2.4.2",
    "react-native-blur": "^3.2.0",
    "react-native-cached-image": "../react-native-cached-image",
    "react-native-code-push": "^5.3",
    "react-native-custom-tabs": "^0.1.7",
    "react-native-easy-toast": "^1.0.9",
    "react-native-firebase": "^3.0",
    "react-native-fit-image": "^1.4.8",
    "react-native-flanimatedimage": "^0.4.0",
    "react-native-highlight-words": "^1.0.1",
    "react-native-keep-awake": "^3.0.1",
    "react-native-linear-gradient": "^2.0.0",
    "react-native-modalbox": "^1.6.0",
    "react-native-orientation": "^3.1.3",
    "react-native-parallax-scroll-view": "../react-native-parallax-scroll-view",
    "react-native-rate": "^1.0.8",
    "react-native-safari-view": "^2.0.0",
    "react-native-sentry": "^0.38.0",
    "react-native-sha256": "^1.1.1",
    "react-native-status-bar-size": "^0.3.2",
    "react-native-swiper": "../react-native-swiper",
    "react-native-tooltip": "^5.2.0",
    "react-native-tts": "^1.5.0",
    "react-native-vector-icons": "^4.1.1",
    "react-native-webview-bridge": "../react-native-webview-bridge-RN0.51",
    "react-redux": "^5.0.1",
    "redux": "^4.0.0",
    "redux-thunk": "^2.1.0"
  },
  "devDependencies": {
    "redux-logger": "^3.0.6"
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions