Reference Error:在Next.js中未定义出口错误
我看到了以下错误datetime-picker v3.5.0和next.js。
Unhandled Runtime Error
ReferenceError: exports is not defined
Call Stack
eval
node_modules/react-datetime-picker/dist/DateTimePicker.js (8:0)
./node_modules/react-datetime-picker/dist/DateTimePicker.js
...
/_next/static/chunks/webpack.js (718:31)
在next.config.js
我有:
const withTM = require('next-transpile-modules')(['react-datetime-picker']); // pass the modules you would like to see transpiled
module.exports = withTM(nextConfig)
I am seeing the following error with react-datetime-picker v3.5.0 and Next.js.
Unhandled Runtime Error
ReferenceError: exports is not defined
Call Stack
eval
node_modules/react-datetime-picker/dist/DateTimePicker.js (8:0)
./node_modules/react-datetime-picker/dist/DateTimePicker.js
...
/_next/static/chunks/webpack.js (718:31)
In next.config.js
I have:
const withTM = require('next-transpile-modules')(['react-datetime-picker']); // pass the modules you would like to see transpiled
module.exports = withTM(nextConfig)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
外观与V12.2.0版本中引入的错误有关。请参阅相关的GitHub问题: https://github.com/github.com/vercel.com/vercel.com/vercel/next.js/issues/issues/issues/issues /38117 。
您现在应该将Next.js降级到v12.1.6。
Looks related to a bug introduced in the v12.2.0 release. See related GitHub issue: https://github.com/vercel/next.js/issues/38117.
You should downgrade Next.js to v12.1.6 for now.