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

yalc link broken after adding/removing packages #209

Open
feightwywx opened this issue Nov 1, 2022 · 0 comments
Open

yalc link broken after adding/removing packages #209

feightwywx opened this issue Nov 1, 2022 · 0 comments

Comments

@feightwywx
Copy link

Hi everyone, I'm using yalc to link my react component library to my project, it's amazing and far better than original yarn link until I add a package using yarn add.

For example, assuming my-project as a project and my-package as a package linked to the project. Everything works well. But after adding something to my project:

yarn add some-package

build, and react complained this:

error - 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.

However, the resolution is running the following commands:

# at /my-package
yalc installations clean my-package
yalc publish

# at /my-project
yalc remove --all
yalc link my-pakcage

Only re-publishing or only re-linking takes no effect. I'm not sure is there any mistake in my use. Is this a bug, or just a designed behavior?

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

1 participant