Issues when running LinguiJS CLI commands #726
Unanswered
dreinert1994
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey everyone, I'm in the process of introducing twin.macro into some existing projects and I am encountering a very strange behavior. One of the other tools we use in these projects is LinguiJS, which offers a macro package to transform your source code such to make it easier to include translations in your JS and JSX. Additionally, they offer a CLI Package to extract and compile your messages catalog automatically.
The issue it seems is that, when running
lingui extract
, the library is somehow causes twin.macro to run as well, but only on certain files. The requirements seem to be the following imports in the source file:This leads to the following output when attempting to run
lingui extract
:Without the explicit import from twin.macro, the issue does not reproduce. I have other files where I am just using the tw prop approach and those files don't generate this error. This is a problem as it prevent the extract command from running on the file, resulting in missing translations.
Any guidance or assistance on how to go about understanding this issue would be immensely appreciated. It's not clear to me what the root cause it or even which library is causing the behavior. Conflicts between twin.macro and LinguiJS seem to be an issue that has existed for quite some time. A similar issue was opened in the LinguiJS Github over a year ago with no resolution or recent activity and so I wanted to raise it here in case anyone had any useful insights. Even just some insight on how to go about debugging this on my end would help.
Beta Was this translation helpful? Give feedback.
All reactions