-
Notifications
You must be signed in to change notification settings - Fork 27k
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
create-next-app always uses yarn if it is installed #11628
Comments
Hey! this is a duplicate of #10647 Feel free to add checking for it similar to https://github.com/sindresorhus/is-npm/blob/master/index.js. I'd like to avoid adding additional deps |
Hi @timneutkens! I've made the changes locally but couldn't figure out how to test it. Would be great if you could share a quick note on how to run/test this locally. I'll add it to the README.md or CONTRIBUTING.md for future contributors. |
Tbh I'm not sure how to test this behavior correctly without fully running |
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Feature request
Is your feature request related to a problem? Please describe.
I have both
npm
andyarn
installed in my laptop. When I create a new app usingnpm init next-app
(ornpx create-next-app
), Next always usesyarn
as the package manager. This is because it just checks ifyarns
is installed and decides to use it.Describe the solution you'd like
Ideally, I'd like this command to check if the command is run using
npm
oryarn
and use the same as package manager for the new app. I'd suggest to use is-npm package (or just copy those few lines 😛, if we don't want to add a dependency) and check if code is run usingnpm
oryarn
. If for any reason this module isn't able to determine the used package manager, we can use the current logic as a fallback mechanism.I'm happy to submit a PR is this makes sense.
The text was updated successfully, but these errors were encountered: