Edit: If you use node >=14.1.0, as a workaround, downgrade your node version. More details in #2844.
This happens when a workspace has lots of components and/or each component has lots of versions. Especially when exporting a dependency that has lots of dependent components.
The process of the "auto-tag" makes sure that all dependents are tagged and then when running "bit export" it exports them as well.
Currently, the export process in some scenarios may take a while to complete.
Exporting components should be a quick process.
There are two issues with the current implementation of "bit export", which need to be addressed.
@davidfirst @GiladShoham I know we have done a lot of progress on this. Can you update on our status here or what is left to improve?
@ranm8 , sure.
According to what I wrote in the description:
There are two issues with the current implementation of "bit export", which need to be addressed.
- Bit sends lots of data to the server that is already on the server. The process needs to be more efficient, check what's missing and send only the diff.
- The transfer rate seems to be very slow (about 100KB per second).
The first issue has been fixed and it's part of the latest version.
The second issue is in-progress. I found the root cause, opened a PR but didn't finish it.
@davidfirst Is there any workaround for the second issue or an estimation for when we are going to have a more performant version of this command available?
Currently, I have to export the components manually, one by one, because the bulk export seems to never finish and it has slowed down quite a lot our productivity using the tool.
@yurijean , during the investigating of this issue back then, I found that components compiled with typescript compiler on Windows were extremely heavy due to a bug that added the entire node_modules directory into the component objects.
If this is the case, and you can start fresh, meaning, you can delete the scopes and re-create the components, that would be the best solution.
Other than that, I don't have an estimation at the moment of fixing the second issue, it's not as easy as I thought it would be.
@davidfirst I'm on Linux but the same issue happens. I'm using TypeScript, however, I don't compile them using Bit, but I export them in this format. I have around 60 components in my local and starting fresh doesn't solve my issue. I tried turning them into JavaScript and exporting them this way, but still no success.
Unfortunately, I'll have to look for another tool to solve my distribution problem since I can't keep Bit working when my collection grows bigger than something around 20 components :disappointed: would Lerna be a good fit for distributing front end components? Do you have any suggestions of other tools that I can use meanwhile this issue isn't solved?
@yurijean , doesn't sound normal. How long does it take for you to export 60 components? If you can add me as a collaborator ([email protected]) I can take a look.
@yurijean , not sure whether you looked into the linked task: https://github.com/teambit/bit/issues/2844 , but if your node version is >=14.1.0, please try to use an older version.
@davidfirst we downgraded Node to 12.0 and it worked! Problem solved! Thank you :smile:
Most helpful comment
@yurijean , not sure whether you looked into the linked task: https://github.com/teambit/bit/issues/2844 , but if your node version is >=14.1.0, please try to use an older version.