umbrella22 / electron-react-template

An Electron & React quick start

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

引入antd 运行报错

li-breeder opened this issue · comments

引入antd 运行报错,是在哪里需要配置嘛
webpack-internal:///…evelopment.js:20085 The above error occurred in the component:

at Button (/Applications/pro/electron-react-template-master/node_modules/antd/lib/button/button.js:137:30)
at div
at App

Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.
webpack-internal:///…evelopment.js:23270 Uncaught Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:

  1. You might have mismatching versions of React and the renderer (such as React DOM)
  2. You might be breaking the Rules of Hooks
  3. You might have more than one copy of React in the same app
    See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.
    at resolveDispatcher (:9080/Applications/p…development.js:1476)
    at Object.useContext (:9080/Applications/p…development.js:1484)
    at Button (:9080/Applications/p…utton/button.js:155)
    at renderWithHooks (webpack-internal:///…evelopment.js:14985)
    at updateForwardRef (webpack-internal:///…evelopment.js:17044)
    at beginWork (webpack-internal:///…evelopment.js:19098)
    at HTMLUnknownElement.callCallback (webpack-internal:///…development.js:3945)
    at Object.invokeGuardedCallbackDev (webpack-internal:///…development.js:3994)
    at invokeGuardedCallback (webpack-internal:///…development.js:4056)
    at beginWork$1 (webpack-internal:///…evelopment.js:23959)

commented

已解决