简体   繁体   English

在 __webpack_require__ 中的 NextJS 中构建错误

[英]Build errors in NextJS in __webpack_require__

I am currently transferring a site from React-Fuse to NextJS with React.我目前正在使用 React 将站点从 React-Fuse 转移到 NextJS。 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在每个构建中抛出,它来自__webpack_require__ function 在

modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);

modules[moduleId] is undefined. modules[moduleId]未定义。

I've tried every fix I can find online and nothing seems to be working, any help is appreciated我已经尝试了我可以在网上找到的所有修复程序,但似乎没有任何效果,感谢任何帮助

babelrc is: babelrc 是:

{
    "presets": ["next/babel"]
}

next.config has nothing pertaining to webpack, only some redirects next.config 与 webpack 无关,只有一些重定向

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.导入实际的 jsx 文件,然后连接到商店。

Try to clean your ".next" folder and run npm install again.尝试清理您的“.next”文件夹并再次运行npm install

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 __webpack_require__(...).context 不是 function - __webpack_require__(...).context is not a function 未捕获的类型错误:__webpack_require__(...).context 不是 function - Uncaught TypeError: __webpack_require__(...).context is not a function 未在反射元数据上定义需求-__webpack_require__问题 - Require is not defined on reflect-metadata - __webpack_require__ issue 为什么webpack向'__webpack_require__'函数添加属性? - Why webpack add properties to '__webpack_require__' function? TypeError: __webpack_require__(...).context 不是 function - 硬编码但不带参数 - TypeError: __webpack_require__(…).context is not a function - Works hardcoded but not with parameter 诊断未捕获的TypeError:__webpack_require __(…).createServer不是函数? - Diagnosing Uncaught TypeError: __webpack_require__(…).createServer is not a function? 未捕获的类型错误:无法读取 __webpack_require__ 处未定义的属性“调用” - Uncaught TypeError: Cannot read property 'call' of undefined at __webpack_require__ React - ssh2 模块错误:未捕获的类型错误:__webpack_require__(...).constants 未定义 - React - ssh2 module Error: Uncaught TypeError: __webpack_require__(…).constants is undefined Vue.js 应用程序在 Chrome 中显示正常,但在 Firefox 中显示空白页 - __webpack_require__ 错误 - Vue.js App showing fine in Chrome, but shows blank page in Firefox - __webpack_require__ error 从 Webpack 2 升级到 Webpack 4 - 如何构建错误 - Upgrade from Webpack 2 to Webpack 4 - How to build with errors
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM