No `npm root` equivalent
I'm not sure if this is expected or not, but I cant seem to find an equivalent to the npm root command for yarn. Feel free to close if this is expected. 👍
Do you want to request a feature or report a bug? feature (could be considered a bug if yarn wants to be as much of a drop in replacement for npm as possible? I assume it's not though)
What is the current behavior?
error Command "root" not found.
If the current behavior is a bug, please provide the steps to reproduce.
run yarn root
What is the expected behavior? yarn should output the path to the node_modules folder
Please mention your node.js, yarn and operating system version. yarn 0.17.10 npm 3.9.5 OSX 10.11.4
We'd also like this because we use npm root to find the root directory to add .bin to our path inside shell scripts.
PATH="$(git rev-parse --show-toplevel)/tools":"$(npm root)/.bin":$PATH
Also, npm root -g gives the location of the global node_modules folder (which may be platform-dependant and npm-version-dependant). I assume the corresponding yarn command would be yarn global root.
@snajjar and yet, there's no such command yarn global root.
is it $(yarn global dir)/node_modules?