I had an error updating to version 2
nelsera opened this issue · 3 comments
nelsera commented
sindresorhus commented
The error says it all. You need to use import
and not require
to import this package. If you're already doing that, it's a problem with Webpack or Next.js not handling ESM modules correctly.
Kikobeats commented
having the same error with Next.js.
sindresorhus commented
Probably worth opening an issue on the Next.js issue tracker.