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

TypeError: Cannot read properties of null (reading 'useMemoCache') #2386

Open
5 of 30 tasks
lilouartz opened this issue Aug 18, 2024 · 1 comment
Open
5 of 30 tasks
Labels
🐛 bug Something isn't working

Comments

@lilouartz
Copy link

Package

  • lucide
  • lucide-angular
  • lucide-flutter
  • lucide-preact
  • lucide-react
  • lucide-react-native
  • lucide-solid
  • lucide-svelte
  • lucide-vue
  • lucide-vue-next
  • Figma plugin
  • source/main
  • other/not relevant

Version

0.428.0

Can you reproduce this in the latest version?

  • Yes
  • No

Browser

  • Chrome/Chromium
  • Firefox
  • Safari
  • Edge
  • iOS Safari
  • Opera
  • Other/not relevant

Operating system

  • Windows
  • Linux
  • macOS
  • ChromeOS
  • iOS
  • Android
  • Other/not relevant

Description

Getting random errors:

TypeError: Cannot read properties of null (reading 'useMemoCache')

The stack trace always originates from lucide-react.

Appears to be related to:

Steps to reproduce

N/A

Checklist

  • I have searched if someone has submitted a similar issue before and there weren't any. (Please make sure to also search closed issues, as this issue might already have been resolved.)
@lilouartz lilouartz added the 🐛 bug Something isn't working label Aug 18, 2024
@lilouartz
Copy link
Author

If anyone else is facing this issue, this Babel configuration (i.e. excluding Lucide) fixes it.

babel({
  babelConfig: {
    plugins: [
      [
        'babel-plugin-react-compiler',
        {
          sources: (filename: string) => {
            if (
              // https://github.com/lucide-icons/lucide/issues/2386
              filename.includes('lucide-react')
            ) {
              return false;
            }

            return true;
          },
        },
      ],
    ],
    presets: ['@babel/preset-typescript'],
  },
  // exclude: /zod\.ts$/u,
  filter: /\.tsx?$/u,
}),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant