-
Notifications
You must be signed in to change notification settings - Fork 252
Description
Motivation ("The Why")
For example, npm/cli#4311 (comment) - when the first (ever, or first locally on a project without a lockfile) install fails, there's no lockfile and no node_modules, and no way to know why something's attempting to be installed.
Arborist has the ability to load the ideal tree in this circumstance, so there's no technical barrier I'm aware of that prevents this command from working.
Example
Solely from a package.json, npm explain foo would work without requiring a lockfile, or reified dependencies.
How
Current Behaviour
When I run npm explain foo without a lockfile or node_modules present, i get npm ERR! No dependencies found matching foo.
Desired Behaviour
I'd expect to get the same result as when either are present - the actual explanation of where foo comes from.
(If this seems like something simple enough to not require an RFC, i'd be happy to make a PR to add it)