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

monorepo support for eject-theme #70

Open
tsargent opened this issue Nov 7, 2023 · 1 comment
Open

monorepo support for eject-theme #70

tsargent opened this issue Nov 7, 2023 · 1 comment

Comments

@tsargent
Copy link

tsargent commented Nov 7, 2023

I'm experimenting with gluestack in a monorepo that is powered by yarn workspaces. One use case I think we might have is the ability to eject the theme from within one of the repo's workspaces. When I try to do that, using npx gluestack-ui-scripts eject-theme, I get:

⏳ Ejecting theme. Please wait...
❌ Error: The '@gluestack-ui/config' package was not found in node_modules. Please run npm install @gluestack-ui/config@latest to install it.

This is because @gluestack-ui/config gets installed in the root-level node_modules directory. This line looks in the workspace's local node_modules directory: https://github.com/gluestack/gluestack-ui-cli/blob/main/packages/gluestack-ui-scripts/src/scripts/eject-theme/index.ts#L8C4-L8C16

So it can't find it.

It might be nice to have this respect the node modules resolution so that it just resolves to the closest installation of @gluestack-ui/config

I would be happy to work on a PR if this is something you would want.

@jerrywonderr
Copy link

I am currently facing this exact issue. Is there any fix for this?

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