In the past I used npm to install some modules globally. Now that I've started a new project I want to begin using yarn.
I'm confused what will happen if I install a new module globally using yarn. Will yarn convert the global node_modules directory ? Or do you I have to delete the global directory and reinstall each module ?
NPM
$(npm prefix -g)/bin$(npm prefix -g)/lib/node_modulesYARN
yarn global binyarn global dirYou can config yarn to use the configuration of npm:
yarn config set prefix $(npm prefix -g)config module, I don't recommend you config yarn to use the path which npm uses, it will delete npm even,after you intall a package globally.
if you dare,try below
yarn global add react --global-folder $(npm prefix -g)/lib
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With