Member-only story

npm vs npx

Sibeesh Venu
5 min readOct 21, 2018
npm vs npx

Introduction

We all are using npm as our package manager, it is easy, right? But with the version npm@5.2.0, when you install the npm, it installs a new package called npx. Have you ever thought what it is? And why it is needed? Are there any benefits of using npx instead of npm? I know you were trying to find the answer for the above questions and at the end, you landed up on this page. I will try to answer those questions for you. And at the end of the article, I am sure that you will get the answer to your questions. I hope you will find this post useful.

Source Code

The source code can be found here.

Background

I was trying to create a react application and as you know that we can create a react application very easy with the help of the react-app command. But when I have visited the official Github documentation of the create react app, it is been mentioned there that we can either use npx or npm. And I was just wondering what is the difference? And that question changed to this article form.

What are we going to do

We will be creating two applications and install the package mocha in both applications so that we can run some tests. If you don’t know what is mocha, visiting the official website wouldn’t be a bad idea.

--

--

Sibeesh Venu
Sibeesh Venu

Written by Sibeesh Venu

An engineer by profession and writer by passion. Author at Sibeesh Passion, Microsoft MVP (2016–2022). Software Engineer @ Microsoft

Responses (4)