question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Macros not working with latest NextJS

See original GitHub issue

Describe 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:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
semoalcommented, Jan 12, 2022

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.

0reactions
stale[bot]commented, Mar 17, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found