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

Eject a non changed component #1065

Closed
jlarrubiaq opened this issue Jun 13, 2018 · 8 comments
Closed

Eject a non changed component #1065

jlarrubiaq opened this issue Jun 13, 2018 · 8 comments

Comments

@jlarrubiaq
Copy link

Hi,

I'd like to know if there is way to eject a component (and consume it as a dependency) when this hasn't been changed and then it's not possible to use bit export --eject.

Thanks

@itaymendel
Copy link
Contributor

Awesome idea @jlarrubiaq .
I think this should be easy to implement... but i'd like to think a bit more about the experience of this feature (for this to be a feature in the export command might feel like stepping a bit out of scope)

@boschr
Copy link

boschr commented Jun 15, 2018

I discovered Bit yesterday. I was wondering how to do exactly this. Looks like this is not possible at the moment? Bit looks really well developed, but this seems a really basic feature to me.

I was facing this problem when i exported some new components. The export went well, but the eject failed. Probably a dirty .git/bit directory? What is the best approach to remove (eject) the local files? I thought: remove the component folders and install the components with npm/yarn.

The components ***@0.0.1, ***@0.0.1 were exported successfully.
However, the eject operation has failed due to an error: Error: ENOENT: no such file or directory, unlink '***/.git/bit/objects/98/f4a3525aa097f2fae5942c42f9b2c87bb7e801'

Thumbup!

@jlarrubiaq
Copy link
Author

Hi @itaymendel ,

yes, I think maybe as a parameter of the export command wouldn't be the best idea. What about including it as a parameter/flag of remove? Similar to bit remove --track but keeping the component as an external dependency.

@ThomasKientz
Copy link

Is there a workaround ? I am stuck with unmodified sourced components that I want to get back as simple dependencies.

@itaymendel
Copy link
Contributor

@ThomasKientz , there is a workaround. you can run bit remove to remove the local component, and then install the component using npm. behind the scenes this is what bit does.

@lubomir-chatoryiskyi
Copy link

@itaymendel Hello! Is it possible to add a command to remove all or a single local component? Because bit remove removes the component from package.json as well.

@itaymendel
Copy link
Contributor

hi @lubomir-chatoryiskyi
not at the moment.
however there are 2 merged features which will allow doing just that.
A combination of a new eject command and support for wildcard when triggering actions on components should solve your issue.
Both will be released alongside Bit's next release.

@itaymendel
Copy link
Contributor

implemented. closing this issue.
bit eject

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants