Skip to content

TextInput and Password components throwing Error: Invalid hook call. #14

@mgeeforce

Description

@mgeeforce

Running the Node Explorer front end w/o packaging using "npm start" is failing due to an invalid hook call error being thrown by the TextInput and Password components on the landing page.

Assuming that the code is not breaking the Rules of Hooks this means mismatched versions of React and ReactDom or multiple versions of React being included in the app - but I don't think I am seeing that.

Running node 17.2.0 with npm 8.3.0. Output of "npm ls react" and "npm ls react-dom" below.

Full disclosure - to get the build to succeed I had to modify r3-tooling-design-system/r3-tooling-design-system-dev/package.json by changing:

"prepare": "husky install",

to

"prepare": "cd ../.. && husky install",

as without this change the build would fail with a "no .git found" error but don't believe that should have adverse effects.

node-explorer$ npm ls react --depth=1
node-explorer@0.1.2 /node-explorer
├─┬ @material-ui/core@4.12.3
│ └── react@16.14.0 deduped
├─┬ @material-ui/icons@4.11.2
│ └── react@16.14.0 deduped
├─┬ r3-tooling-design-system@npm:@r3/r3-tooling-design-system@2.0.2 -> ./r3-tooling-design-system/r3-tooling-design-system-dev
│ └── react@17.0.2
├─┬ react-dom@16.14.0
│ └── react@16.14.0 deduped
├─┬ react-redux-toastr@7.6.6
│ └── react@16.14.0 deduped
├─┬ react-redux@7.2.6
│ └── react@16.14.0 deduped
├─┬ react-scripts@4.0.3
│ └── react@16.14.0 deduped
├── react@16.14.0
└─┬ recharts@2.1.8
  └── react@16.14.0 deduped
node-explorer$ npm ls react-dom --depth=1
node-explorer@0.1.2 /node-explorer
├─┬ @material-ui/core@4.12.3
│ └── react-dom@16.14.0 deduped
├─┬ @material-ui/icons@4.11.2
│ └── react-dom@16.14.0 deduped
├─┬ r3-tooling-design-system@npm:@r3/r3-tooling-design-system@2.0.2 -> ./r3-tooling-design-system/r3-tooling-design-system-dev
│ └── react-dom@17.0.2
├── react-dom@16.14.0
└─┬ recharts@2.1.8
  └── react-dom@16.14.0 deduped

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions