Skip to content

Commit

Permalink
improve an error when snapping/tagging a dependency from another lane…
Browse files Browse the repository at this point in the history
… to suggest solutions (#7728)
  • Loading branch information
davidfirst authored Aug 2, 2023
1 parent d26a860 commit da0cd74
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scopes/component/snapping/snapping.main.runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,9 @@ there are matching among unmodified components thought. consider using --unmodif
if (!isPartOfHistory) {
const laneOrMainStr = lane ? `current lane "${lane.name}"` : 'main';
throw new Error(
`unable to tag/snap ${component.id.toString()}, it has a dependency ${dep.id.toString()} which is not part of ${laneOrMainStr} history.`
`unable to tag/snap ${component.id.toString()}, it has a dependency ${dep.id.toString()} which is not part of ${laneOrMainStr} history.
one option to resolve this is installing ${dep.id.toStringWithoutVersion()} via "bit install", which installs the version from main.
another option, in case this dependency is not in main yet is to remove all references of this dependency in the code and then tag/snap.`
);
}
})
Expand Down

0 comments on commit da0cd74

Please sign in to comment.