Skip to content
New issue

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

@pigment-css compatibility problem #2288

Closed
rkurbatov opened this issue Jul 24, 2024 · 2 comments
Closed

@pigment-css compatibility problem #2288

rkurbatov opened this issue Jul 24, 2024 · 2 comments

Comments

@rkurbatov
Copy link

rkurbatov commented Jul 24, 2024

That looks more like @pigment-css problem but probably somebody had similiar issues with other packages.

Here is cross-link to the @pigment-css bug: mui/pigment-css#115

And here is the link to the minimal working app: https://github.com/rkurbatov/acq-test

Once I uncomment @pigment-css css function in the _error.tsx (or any other component that uses useTranslation import)

// import { css } from '@pigment-css/react'
import { serverSideTranslations } from 'next-i18next/serverSideTranslations.js'
import { useTranslation } from 'next-i18next'

const ErrorPage = () => {
    const { t } = useTranslation('common')

    return <div>{t('App.Error')}</div>
}

export default ErrorPage

// const styles = css({
//     color: 'red'
// })

export const getServerSideProps = async (ctx) => {
    const localeProps = await serverSideTranslations(ctx.locale, ['common'])

    return {
        props: {
            ...localeProps,
        }
    }
}

I have the import problem:

EvalError: Cannot read properties of null (reading 'default') in/home/rkurbatov/WebstormProjects/acq-test/node_modules/.pnpm/i18next-fs-backend@2.3.1/node_modules/i18next-fs-backend/cjs/fs.js
| /home/rkurbatov/WebstormProjects/acq-test/node_modules/.pnpm/i18next-fs-backend@2.3.1/node_modules/i18next-fs-backend/cjs/readFile.js
| /home/rkurbatov/WebstormProjects/acq-test/node_modules/.pnpm/i18next-fs-backend@2.3.1/node_modules/i18next-fs-backend/cjs/index.js
| /home/rkurbatov/WebstormProjects/acq-test/node_modules/.pnpm/next-i18next@15.3.0_i18next@23.12.2_next@12.3.4_react-i18next@15.0.0_react@17.0.2/node_modules/next-i18next/dist/commonjs/createClient/node.js
| /home/rkurbatov/WebstormProjects/acq-test/node_modules/.pnpm/next-i18next@15.3.0_i18next@23.12.2_next@12.3.4_react-i18next@15.0.0_react@17.0.2/node_modules/next-i18next/dist/commonjs/appWithTranslation.js
| /home/rkurbatov/WebstormProjects/acq-test/node_modules/.pnpm/next-i18next@15.3.0_i18next@23.12.2_next@12.3.4_react-i18next@15.0.0_react@17.0.2/node_modules/next-i18next/dist/commonjs/index.js
| /home/rkurbatov/WebstormProjects/acq-test/pages/_error.tsx

or even hanging app if I run it again.

I use NextJS v12 just like we do on our project, but that happens on NextJS v13 (and probably v14 as well).

@adrai
Copy link
Member

adrai commented Jul 30, 2024

try with v15.3.1

@adrai adrai closed this as completed Jul 30, 2024
@rkurbatov
Copy link
Author

Problem is fixed. Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants