Element type invalid, expected string or class/function.

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.
This is what I get when I run plasmic project from my localhost, can anyone help me solve this error?

If you are using codegen, then you need to make sure you are setting your import paths correctly in your component registrations.

You can look at the error to figure out what is having problems, and look at the code that is generated to see what import is incorrect

I figure out the whenever Iimport “dropdown” component form antDs5 HostLess. it throws that error

Other antd5 components work?

Can you check that you have @plasmicpkgs/antd5 installed as a dependency in package.json?

If none of the above work, would you mind sharing your codebase (or able to repro in a publicly shareable git repo)? We can take a look

@yang I have following denedancy in package.json


that dropdown causing error. when I remove it , it works in browser, localhost . but how can I use that dropdown without such error

I see you have loader installed, but that error comes from codegen, are you using codegen / the plasmic cli? If so You’ll need to install that plasmic package I mentioned.

If you’re sure you’re only using loader, can you share the full info about where exactly this error is coming from? Including the stack trace, the plasmic project url, and where in the plasmic project we can look.