Macros not working with latest NextJS
See original GitHub issueDescribe the bug
The macro stopped working with NextJS 12.0.7.
To Reproduce Simply start with a bank NextJS project, follow Lingui’s implementation details and add the macros. Import any macro into a component.
Expected behavior Macros should work correctly.
Current behavior NextJS is unable to compile the page with error:
./pages/index.js
TypeError: Cannot read properties of undefined (reading 'uid')
Additional context Add any other context about the problem here.
- jsLingui version
3.13.0
- Babel version
7.16.7
- Your Babel config
{
"presets": ["next/babel"],
"plugins": ["macros"]
}
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Advanced Features: Customizing Babel Config - Next.js
To start, you only need to define a .babelrc file (or babel.config.js ) at the top of your app. If such a file...
Read more >How to fix SVG in Next.js with twin macro and tailwind css
Chapters. View all · Intro · Intro · Prerequisites · Prerequisites · Troubleshooting · Troubleshooting · Testing · Testing.
Read more >Module not found error in twin.macro and nextjs - Reddit
I am trying to build a project using nextjs and plan to use twin.macro but i get error like this everytime: TypeError…
Read more >Next.js | Import Module with Fs dependency - Stack Overflow
There I try to import glsl ( import glsl from "babel-plugin-glsl/macro"; ), but my problem with it is that I get an "Module...
Read more >Next.js + twin.macro - CodeSandbox
Problems. 0. W. dd25ca83d. Tab Moves FocusScreen Reader OptimizedLn 1, Col 1Spaces: 2UTF-8LFJavaScript. VS Code's tsserver was deleted by another ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It was a bug with Next 12.0.7 but they fixed it in 12.0.8, just released a few hours ago. Give it a try, in my case it’s fixed.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.