We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug When using Next.js dynamic imports, Lingui is unable to extract messages from the pages/components using dynamic imports.
To Reproduce Steps to reproduce the behavior, possibly with minimal code sample, e.g:
import { Trans } from "@lingui/react" import dynamic from "next/dynamic" const TranslatedComponent = dynamic(() => import("../components/TranslatedComponent")) export default function Index() { return (<div><TranslatedComponent /></div> }
When extracting pages/index.js, i get this error: Cannot process file app/pages/index.js: Cannot read property 'pagesDir' of undefined
Cannot process file app/pages/index.js: Cannot read property 'pagesDir' of undefined
Expected behavior Messages are extracted from pages using dynamic components.
Additional context
This used to work fine in Next.js 10.1, but broke in 10.2. Likely related to this: PR: vercel/next.js#24281 Issue: vercel/next.js#24566
3.8.10
7.14.0
.babelrc
The text was updated successfully, but these errors were encountered:
Actually crashes internally Next but extracts correctly the value to the messages file. (Tried with @canary version of Next and the latest)
Actually the fix from our side is to remove the Typescript extractor located here: https://github.com/lingui/js-lingui/blob/main/packages/cli/src/api/extractors/index.ts#L6, we already discussed this on #1047 and probably we I can find some free hours I'll work hard on a next version of Lingui will all these bugs fixed.
On my head I want to add a similar API of Jest to add any extractors :)
Sorry, something went wrong.
Released 3.9.0 give it a try when you can, but i'm pretty sure that will fixed :)
No branches or pull requests
Describe the bug
When using Next.js dynamic imports, Lingui is unable to extract messages from the pages/components using dynamic imports.
To Reproduce
Steps to reproduce the behavior, possibly with minimal code sample, e.g:
When extracting pages/index.js, i get this error:
Cannot process file app/pages/index.js: Cannot read property 'pagesDir' of undefined
Expected behavior
Messages are extracted from pages using dynamic components.
Additional context
This used to work fine in Next.js 10.1, but broke in 10.2. Likely related to this:
PR: vercel/next.js#24281
Issue: vercel/next.js#24566
3.8.10
7.14.0
.babelrc
) or framework you use (Create React App, Meteor, etc.)Next.JS 10.2
The text was updated successfully, but these errors were encountered: