“npm” vs “npx”

DENNIS ILUMA
1 min readAug 6, 2021

npm(Node Package Manager) has basically three roles.

1, to install packages from the NPM global scope into your System global scope.

2, to install package from your system global scope into your System local scope(project folder).

3, and to run package already install in your System global scope.

…………………………..…..NOTE………………………….……

NPM global scope == Node remote server.

System global scope == your computer.

System local scope ==your project folder.

………………………………………………………………………….

npx(Node Package Executor) has basically two roles

1, to install package from the internet at large into your System local scope(project folder).

2, to execute package in your System local scope.

npm only install packages from the node server modules into your system while npx installs packages from the internet directly into your project folder.

npx doesn’t install package into your system global scope instead it installs them on the folder where the command were executed. npx can install packages that aren’t associated with node.

That’s all.

--

--

DENNIS ILUMA
0 Followers

Software engineer. Majors in Java, AI, Frontend, DevOps & Cloud.