This is for debugging the following error
Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object. Check the render method of `t`
which only appears in production
environment. Thank you for your help.
Dev:
npm run dev
- for windows -
npm run dev-win
Production:
npm run build
npm start
- for windows -
npm run start-win
In this repo, you can do one of the following to eliminate the error...
- remove
<Checkbox>Checkbox</Checkbox>
fromcomponents/sell/SellForm.js
- comment
import { connect } from 'react-redux'
incomponents/sell/SellForm.js
- delete a file in
pages/subdir/
- remove
antd
import from.babelrc
Sub-folder plays key roles in reproducing the error in my opinion.
I also tried to customize antd theme too via styles/ant-theme-vars.less
according to this repo.