I am currently transferring a site from React-Fuse to NextJS with React. Mostly everything is working fine, but upon trying to create a build there is an error that I cannot get around:
> Build error occurred
TypeError: Cannot read property 'b' of undefined
is thrown in every build, it is coming from the __webpack_require__
function at
modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
modules[moduleId]
is undefined.
I've tried every fix I can find online and nothing seems to be working, any help is appreciated
babelrc is :
{
"presets": ["next/babel"]
}
next.config has nothing pertaining to webpack, only some redirects
Pages are written as follows:
import SomePage from 'components/aPage/SomePage'
import { connect } from 'react-redux'
import * as AuthActions from 'auth/store/actions'
function mapDispatchToProps(dispatch) {
...
}
function mapStateToProps({ user, bank }) {
...
}
export default connect(mapStateToProps, mapDispatchToProps)(SomePage)
with the actual jsx file being imported and then connected to the store.