install: log failed optional dependencies as info instead of warn (fixes #11632) #12841
Conversation
This assertion is not required for this test and probably varies by platform.
@iarna what do you think of this change? Specifically, I'm not sure how I feel about changing the warning label based on the specific conditions included. |
@othiym23 |
@othiym23 Mmm, yeah, I'm concerned about that aspect too. First of all, this is not the only error that can arise for an optional dependency– any solution needs to be more comprehensive. I think if we're changing this to The other case of warnings on optional installs is when they fail during lifecycle scripts. That's handled over in In both cases it's not quite as simple as just printing out the error as the error object needs to be passed to |
This should be a debug message ... |
@iarna hi Becca, I first thought it might not help to reply but I liked your bio, and was encouraged by the fact we both seem to "prefer the pragmatic to the idealistic". Would you be willing to consider reopening this one in the spirit of such pragmatism? Some reasons are:
Also, a probably not persuasive quote from a not very good movie but with some lengendary acting, bet you can't guess it: |
This was replaced by #17530 which the author then closed. As I said there, I'd be happy to accept a version of this that directly calls |
New PR: #19198 |
As described in issue #11632, npm outputs warning messages if optional dependencies fail to install because they are incompatible with the current operating system. npm outputs warnings even though everything completed successfully as expected. This is confusing and it trains people to ignore warnings, which might cause them to later overlook a "real" warning.
I changed the verbosity for these messages from "warn" to "info".
This is my first pull request for npm. I hope I followed all contribution guidelines. Let me know if this pull request is ok or if I need to make changes.