twin.macro icon indicating copy to clipboard operation
twin.macro copied to clipboard

Having issue with Next.js v 12+

Open Nate93 opened this issue 3 years ago • 1 comments

Hi, I'm facing the following errors while importing twin.macro to my component

Module not found: Can't resolve 'module'
Import trace for requested module:
./node_modules/import-fresh/index.js
./node_modules/cosmiconfig/dist/loaders.js
./node_modules/cosmiconfig/dist/index.js
./node_modules/babel-plugin-macros/dist/index.js
./node_modules/twin.macro/macro.js

packages version
twin.macro: ^3.0.0-rc.3 NextJs: 12.2.5

This error still happens even though I downgraded twin.macro version to 2.8.2

Nate93 avatar Sep 05 '22 17:09 Nate93

Hm, @Nate93, it may be a Next.js webpack issue — take a look at this: https://github.com/ben-rogerson/twin.macro/discussions/219 — and see if that solves your issue.

theonesean avatar Sep 08 '22 14:09 theonesean