Bit: Bit have invalid state

Created on 27 Aug 2018  路  3Comments  路  Source: teambit/bit

Bit status giving me invalid state, after the following.

I exported my tracked components. Then, I want to change my scope, so

  1. I deleted bitmap file and it gives me component has invalid state, then,
  2. I deleted bit.json and bit init again
  3. I add components using bit add
  4. Then run bit status again but it again says it has an invalid state.
    here is the full error
component components/filters has an invalid state.
           1) it has a model instance so it's not new.
           2) it's not in staged state.
           3) it doesn't have a version in the bitmap file.
           Maybe the component was interrupted during the export and as a result the bitmap file wasn't updated with the new version

Specifications

  • Bit version: 13.0.4
  • Node version: 10.9.0
  • npm / yarn version: 6.2.0 / 1.9.4
  • Platform: MacOS
  • Bit compiler (include version): react-typescript 0.0.5
  • Bit tester (include version): jest: 0.0.34

Most helpful comment

@Nuruddinjr , i guess you tried to reset your Bit workspace and start a fresh one.
The issue you get is due to the fact that the workspace is in a state which its objects and components are still stored, however, it is lacking additional data that was stored within the .bitmap and bit.json files.
you can read more about what bit stores and where here

bit keeps its object database in a hidden directory that you will need to clear as well.
there's a specific flag for the bit init command that handles such cases. please run bit init --reset-hard to reset your workspace.

All 3 comments

@Nuruddinjr , i guess you tried to reset your Bit workspace and start a fresh one.
The issue you get is due to the fact that the workspace is in a state which its objects and components are still stored, however, it is lacking additional data that was stored within the .bitmap and bit.json files.
you can read more about what bit stores and where here

bit keeps its object database in a hidden directory that you will need to clear as well.
there's a specific flag for the bit init command that handles such cases. please run bit init --reset-hard to reset your workspace.

@itaymendel I went to .git folder, deleted the .bit folder in it, and bit init again, it works for me.

alright, thanks for the update!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rap0so picture rap0so  路  13Comments

nvthuong1996 picture nvthuong1996  路  13Comments

itaymendel picture itaymendel  路  16Comments

FredyC picture FredyC  路  20Comments

viiralt picture viiralt  路  11Comments