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
Fallback to yarn when npm isn't installed #8787
Comments
Thanks for reporting. How did you end up with Node installed without npm being installed? Since npm is bundled with Node, I would have expected it to be a safe bet to assume it was installed. |
@not-an-aardvark: I've uninstalled npm on purpose, to see how development would go with yarn alone. Haven't had a problem until now, and all operations have been much faster. |
Is it possible to bundle either npm or yarn as a dependency (without massively increasing the size of the published package)? Are there APIs we could call directly instead of relying on the presence of an executable in the user's path? |
I think it might be easiest to just assume that npm is present, and print a useful error message if it's not. Given that npm is bundled with node, I suspect it's quite rare for users to not have npm installed. So we could do everything else, and then tell the user in an error message that "to finish the setup, you need to install these packages somehow." |
Agree with @not-an-aardvark. I'm in the minority right now, but I suspect as yarn gets a larger foothold, others might disable |
Fixed in #9169. |
4.0.0
v7.10.0
None! Due to some issues with npm, I'm testing a yarn-only development flow.
What did you do? Please include the actual source code causing the issue.
What did you expect to happen?
It would be great if eslint didn't rely on npm to be installed, and ran
yarn
ifnpm
was not found.What actually happened? Please include the actual, raw output from ESLint.
The text was updated successfully, but these errors were encountered: