react-datetime-picker
react-datetime-picker copied to clipboard
ReferenceError: exports is not defined error with Next.js
trafficstars
I am seeing the following error with react-datetime-picker v3.5.0. Any help resolving this will be appreciated.
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)