Skip to content

Try our new Crash Courses!

Buy one of our new Crash Courses, now hosted on Teachable.

Why should I use npm?

Details

npm is a package manager, primarily for the JavaScript ecosystem. A package manager is a program that lets you easily install software that other people have written on your computer or in your projects. These pieces of software are called packages. A package manager also lets you install specific versions of each package, so you can easily upgrade or downgrade a package. The package manager will note which version of a package you are using in a file called package.json so that you can easily download the right versions again in the future, or so that other developers can download the right versions if you’re collaborating with others.

npm is a command line tool and is accessed through the terminal.

By using a package manager to install packages written by other people, you can build your own projects much more quickly, since you don’t have to write all of the code from scratch.

npm is not the only package manager for the JavaScript ecosystem. There is another package manager available called Yarn.

Exercises

You can download exercises to go along with these tutorials on our npm exercises GitHub repository. You don’t have to know how to use GitHub to use them. Just click the green Code button in the corner and click the Download ZIP option. Then unzip the folder and open it in your text editor.

Each module has a folder. Inside each module folder is a folder for each lesson. The lesson folders usually contain files already where you can put your code, although occassionally you will be asked to create files on your own.

NOTE: You can ignore the instructions included in the folders. The instructions are now listed directly in the lessons.

References

About npm

Back to: npm Reference > npm Introduction