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

Uncaught Error: Element type is invalid: #2

Closed
RockyKev opened this issue Sep 23, 2024 · 3 comments · Fixed by #3
Closed

Uncaught Error: Element type is invalid: #2

RockyKev opened this issue Sep 23, 2024 · 3 comments · Fixed by #3

Comments

@RockyKev
Copy link

Uncaught Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

I'm using wp-env start to kick up a docker server. Uncertain if it's related.

How to recreate:

  1. Set up this project using "@wordpress/dataviews": "^4.4.0"
  2. npm i to install that newer version
  3. Visit that option page http://localhost:8888/wp-admin/upload.php?page=add-media-from-third-party-service
  4. Click on the 3 dots under Actions.
  5. The app crashes and the error appears in devtools console.

The current project is using @wordpress/dataviews 4.2.0, and that version works.

@Tropicalista
Copy link

This happens also if you try with WP 6.7

@oandregal
Copy link
Contributor

👋 @RockyKev This is a known issue: the example plugin, as it is, it's not compatible with all WordPress/Gutenberg versions.

A fix (with the explanation) has landed in Gutenberg as of WordPress/gutenberg#66825 and it'll take one week or two to be released. I'll update this plugin when it does.

@oandregal
Copy link
Contributor

An updated on this: we just landed #3 and this should be fixed. I manually tested it with WordPress 6.6 and WordPress 6.7, with and without the latest Gutenberg plugin active.

@RockyKev would you be able to confirm it works for you?

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

Successfully merging a pull request may close this issue.

3 participants