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

import is fetching an old version of the component after it's been updated. #88

Closed
ranyitz opened this issue Mar 13, 2017 · 1 comment
Closed

Comments

@ranyitz
Copy link
Contributor

ranyitz commented Mar 13, 2017

I had a bug with one of the testers in bit-js project, so I needed to modify it from a different project. I opened a new project ($ mkdir new-project $ bit init) and modified bit.envs/testers/mocha.

$ bit modify bit.envs/testers/mocha

It was at version 5
I've modified it, committed and export it back to the scope

$ bit commit testers/mocha "remove bit-js from bit.json
$ bit export @this/testers/mocha bit.envs

After I got back to my original project (bit-js) I tried to import the latest version ( version 6 )

$ bit import bit.envs/testers/mocha

but instead of getting the version 6 I got version 5 and the bug occurred again.

After few retries I realized that it's not going to work and tried to import the version 6 directly, then I got an error that the version 6 does not exist.

import_error

Technical explanation:
Bit uses cache, and there is no way to remove it.
The bug occurred because the component-object (cached) had only 5 versions.
Bit should go and check the latest version in the remote scope before deciding to use the latest version specified in the cached component-object.

Right now, once you've imported a component, the current versions of this component stay cached and you can never update until you remove it.

A workaround would be to delete the .bit/objects directory.

@itaymendel
Copy link
Contributor

resolved a few months ago, but forgot to close issue in time.

davidfirst added a commit that referenced this issue Apr 27, 2020
#88)

* fix parsing tsx files by adjusting the parser option to @typescript-eslint/parser. previously, they were configured according to typescript-eslint-parser

* bump version. update CHANGELOG
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