Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the effect of this?
technically using yarn should be fine. the only downside would be that the lockfile is not taken into account when installing through yarn.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this helps you - https://stackoverflow.com/questions/57328593/prevent-yarn-install-from-running-in-project-i-e-force-npm-install
In my opinion , we should stick to yarn or npm, not both because of lock file. So far, this repo is using npm, so I just added a restriction that prevents using yarn.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea of this PR, but the implementation seems to add even more confusing error message. Currently, if you run yarn you get a warning at the top about the presence of an npm lockfile.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@locks
I don't think it is confusing. yarnpkg/yarn#4895 (comment) suggests this too.
I think a warning is not sufficient to prevent yarn because some ppl don't pay attention to warnings.
What do you think, @Turbo87?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
even though I'm using
npm
to install the dependencies I usually still use things likeyarn test
andyarn start:live
because I'm used to using yarn from other projects and have several shell aliases set up for things like this.while I appreciate the idea and effort, I think I would prefer to not merge this 😞
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Turbo87
I see. That makes sense. Thank you for reviewing it anyways!
I'll close this PR.