Skip to content

TypeError: dependency.getCondition is not a function #11821

@vitorcamachoo

Description

@vitorcamachoo

Describe the bug

Cannot build the application on the latest version (5.0.0)

Did you try recovering your dependencies?

Yes.

Which terms did you search for in User Guide?

N/A

Environment

Environment Info:

  current version of create-react-app: 5.0.0
  running from /home/.nvm/versions/node/v16.5.0/lib/node_modules/create-react-app

  System:
    OS: macOS 12.1
    CPU: (8) x64 Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz
  Binaries:
    Node: 16.5.0 - ~/.nvm/versions/node/v16.5.0/bin/node
    Yarn: Not Found
    npm: 7.19.1 - ~/.nvm/versions/node/v16.5.0/bin/npm
  Browsers:
    Chrome: 96.0.4664.110
    Edge: Not Found
    Firefox: Not Found
    Safari: 15.2
  npmPackages:
    react: ^16.13.1 => 16.14.0 
    react-dom: ^16.13.1 => 16.14.0 
    react-scripts: 5.0.0 => 5.0.0 
  npmGlobalPackages:
    create-react-app: 5.0.0

Steps to reproduce

  1. react-scripts start

Expected behavior

Should build the application with success.

Actual behavior

Creating an optimized production build...
(node:40391) [DEP_WEBPACK_COMPILATION_NORMAL_MODULE_LOADER_HOOK] DeprecationWarning: Compilation.hooks.normalModuleLoader was moved to NormalModule.getCompilationHooks(compilation).loader
(Use `node --trace-deprecation ...` to show where the warning was created)
<path>/node_modules/react-scripts/scripts/build.js:19
  throw err;
  ^

TypeError: dependency.getCondition is not a function
    at ModuleGraph.setResolvedModule (<path>/node_modules/react-scripts/node_modules/webpack/lib/ModuleGraph.js:196:15)
    at <path>/node_modules/react-scripts/node_modules/webpack/lib/Compilation.js:1845:20
    at <path>/node_modules/react-scripts/node_modules/webpack/lib/util/AsyncQueue.js:352:5
    at Hook.eval [as callAsync] (eval at create (<path>/node_modules/react-scripts/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (<path>/node_modules/react-scripts/node_modules/tapable/lib/Hook.js:18:14)
    at AsyncQueue._handleResult (<path>/node_modules/react-scripts/node_modules/webpack/lib/util/AsyncQueue.js:322:21)
    at <path>/node_modules/react-scripts/node_modules/webpack/lib/util/AsyncQueue.js:305:11
    at <path>/node_modules/react-scripts/node_modules/webpack/lib/Compilation.js:1299:4
    at <path>/node_modules/react-scripts/node_modules/webpack/lib/Cache.js:85:6
    at <path>/node_modules/react-scripts/node_modules/webpack/lib/Cache.js:39:11

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions