npx alternative for yarn1 min read • 25 Mar 2023
npx is a cli tool used to execute npm package binaries without installing them globally on your machine. Similarly we can also use yarn to run npm package binaries in a temporary environment without installing them globally. We can use the yarn dlx command which comes with Yarn v2 to do it.
yarn set version berry
yarn dlx uglify-js test.js -o test.min.js