react-datetime-picker icon indicating copy to clipboard operation
react-datetime-picker copied to clipboard

ReferenceError: exports is not defined error with Next.js

Open viraj071 opened this issue 3 years ago • 0 comments
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)

viraj071 avatar Jun 30 '22 05:06 viraj071