Search code examples
next.jsemotionvercel

Nextjs emotionjs and vercel: Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: ..@emotion/cache/node_modules/stylis/dist/stylis.umd.js


Here's the message when deployed. Code to replicate this error: http://github.com/jojonicho/next-apollo-codegen

error message


Solution

  • I fixed it by removing the next.config.js file entirely.