DEV Community

Discussion on: npm vs npx - which to use when?

suchitra_13 profile image

I know this is not a good comparision but I have a doubt in mind that .. in case of "npm" if we don't want to install some dependency locally we generally use "npx".
So, in case of "yarn" package manager what should we use when we don't want to instally some dependency!
Nutshell "yarn" is the alternative of "npm" so, what is alternative of "npx" in terms of "yarn" package manager??

Thread Thread
mudasirh profile image
Mudasir Habib

Basically yarn is just an improvement to npm. Yarn consume the same package.json format and can install npm packages.