我正在尝试通过运行“npm run build”来生成我的 next-js 应用程序的构建。但不幸的是我每次都会收到这个错误。 运行 npm run build 时出错 这是我的 .eslintrc.json 文件 .eslintrc.json 和 .babelrc .babelrc.
将
next/babel
中的 .eslintrc
更改为 next
可以使警告消失。然而,在我的 vscode 中出现了一堆与 Parsing error 相关的新错误:找不到模块 'next/babel'
因此,这个答案也非常适合这个问题:https://stackoverflow.com/a/68193974/13943679