-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
'lerna add' creates dependency on '^undefined' tag if package.json is missing version #1799
'lerna add' creates dependency on '^undefined' tag if package.json is missing version #1799
Comments
Ugh, I wish I never allowed a lerna-managed package.json to omit the version field. It's a dirty hack for people who don't want to version private packages (which is irrelevant anyway because they're never published). I agree |
This thread has been automatically locked because there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
If package 'foo' does not have a "version" field in it's package.json,
lerna add foo --scope bar
will add the following to bar's package.json:...and then crash, leaving the project in a broken state until the invalid tag is manually cleaned up.
Expected Behavior
Verify that version is valid before modifying package.json and emit a polite error if necessary.
Current Behavior
Possible Solution
Seems like a pretty easy fix to vet version before modifying bar/package.json
Steps to Reproduce (for bugs)
lerna.json
Context
Small amount of time figuring out the cause of the error (foo/package.json), followed by a small amount of time figuring out that (bar/package.json) had been modified/corrupted.
Your Environment
lerna --version
npm --version
node --version
The text was updated successfully, but these errors were encountered: