Understanding NPM - Node.js Package Manager

Understand and practice NPM. Learn how to use NPM in Node.js, how to install NPM packages, how to configure NPM scripts.

4.51 (1433 reviews)
Udemy
platform
English
language
Web Development
category
22,795
students
2.5 hours
content
Feb 2024
last update
$89.99
regular price

What you will learn

Initialize any project using NPM init

Install project dependencies

Understand what is the difference between dependencies and development dependencies

Explain what is Semantic Versioning and what different kinds of packages versions mean

Explain difference between Browser Application and Server Package

Understand purpose of the "package-lock" file

Update project dependencies

Configure NPM scripts and execute them

Combine NPM scripts into the one script

Explain what is executable script and how it is executed on the Mac and on Windows

Description

In this course I will explain you what is NPM and how it is used.

This course is designed to provide students with a comprehensive understanding of NPM, the Node.js package manager. Students will learn how to use NPM to manage Node.js packages and create their own packages.

The course begins with an overview of NPM and its role in the Node.js ecosystem. Students will learn how to install and configure NPM, including setting up a new Node.js project and managing project dependencies using NPM.

The course then dives into more advanced NPM features, including package versioning and semantic versioning.

Throughout the course, students will gain hands-on experience working with NPM through a series of practical exercises and labs. By the end of the course, students will have a solid understanding of NPM and be able to effectively manage Node.js packages in real-world scenarios.

Learning Objectives:

  • Understand NPM and its role in the Node.js ecosystem

  • Install and configure NPM and create a new Node.js project

  • Manage project dependencies using NPM

You will learn how to initialize new project, how to install new dependencies and explore their child dependencies.

We will also discuss what is Semantic Versioning and what Major, Minor and Patch versions mean.

You will also understand what is the purpose of the package-lock.json file.

I will explain you what is the purpose of the NPM scripts and how they should be used. We will talk about built-in NPM scripts and custom script. Also we will combine several NPM scripts in a one using npm-run-all external package.

You will understand what is executable script and what is the purpose of the .bin folder in the node_modules folder. I will explain you what is shebang line and how it is used on the Unix-based system and on Windows.

After this course you will gain a deep knowledge about NPM and learn how to use it on practice.

Content

Introduction to the NPM

PRACTICE - Exploring NPM packages
LECTURE - Package.json and init
LECTURE - Semantic Versioning

Installation of the NPM packages

LECTURE - Packages Installation
PRACTICE - Install package in the project
CHALLENGE - Install Semver package
CHALLENGE - Install Semver Package - SOLUTION
PRACTICE - Install Browserslist - package with own dependencies

Dependencies vs Development Dependencies

LECTURE - Dependencies and Development Dependencies
PRACTICE - Examine Development Dependencies
PRACTICE - Browser App vs Server Package
CHALLENGE - Clock Browser Application
✓ CHALLENGE - Clock Browser Application - SOLUTION
LECTURE - Clock Challenge Summary
LECTURE - Browser App vs Public Package

NPM packages versions and package-lock.json file

PRACTICE - Exploring Package Information and Versions
PRACTICE - Installing Specific Package Version
LECTURE - Why package-lock.json file is needed?
CHALLENGE - Reinstall old package version without lock file
✓ CHALLENGE - Reinstall old package version without lock file - SOLUTION
LECTURE - How lock file is handled
LECTURE - Lock file summary

Updating NPM packages

LECTURE - Update NPM packages overview
CHALLENGE - Update project dependencies
✓ CHALLENGE - Update project dependencies - SOLUTION

NPM Scripts

LECTURE - Introduction to the NPM scripts
PRACTICE - Start NPM script
CHALLENGE - Create prestart script
✓ CHALLENGE - Create prestart script - SOLUTION
PRACTICE - Custom NPM scripts
CHALLENGE - Run NPM scripts simultaneously
✓ CHALLENGE - Run NPM scripts simultaneously - SOLUTION

Executable scripts in the NPM

LECTURE - NPM .bin Folder with Executable Scripts
PRACTICE - Explore .bin Folder on the Mac
PRACTICE - Explore .bin Folder on Windows
LECTURE - NPM Scripts Wrap-Up
LECTURE - Additional NPM topics

Screenshots

Understanding NPM - Node.js Package Manager - Screenshot_01Understanding NPM - Node.js Package Manager - Screenshot_02Understanding NPM - Node.js Package Manager - Screenshot_03Understanding NPM - Node.js Package Manager - Screenshot_04

Reviews

Sneha
September 28, 2023
This course is best suited if you want to understand the very basics of how NPM works and how a project shapes up. I will surely recommend it to others.
Sumit
September 18, 2023
I really appriciate the efforts creator has put in. Explanation is smooth but i think more examples could have been covered. Even after completing the course i'm not extremely confident to say that now i know NPM. Points: 1. Github clone and then NPM install in a different system. 2. Usecases of ~ and versions without any ^ 0r ~ 3. More examples of how an update can cause issues in bigger projects 4. I couldn't understand bin folder at all. Thanks!
Byron
July 15, 2023
Yes it is. It is allowing me to learn a whole lot more about NPM and my ability to programming with it and Hardhat as well as solidity. Also why some errors pop up that I couldn't understand the reason before.
Enio
May 15, 2023
I was looking to dive deeper into NPM, specifically the scripts configuration and usability. Very clear explainations, recommendable course.
Vitali
April 25, 2023
Bad: 1) 1.5 hours to explain basic things about npm 2) No explanations about peerDependency 3) Accent 4) The author's statement about installing all packages in devDependencies for a browser app is not entirely accurate. When creating a browser app, the distinction between dependencies and devDependencies is still important. Here's a clarification: dependencies: These are packages that your application needs to run correctly. They are required in production as well as during development. Examples include utility libraries (e.g., Lodash, Moment.js), UI libraries (e.g., React, Angular, Vue), or state management libraries (e.g., Redux, Vuex). devDependencies: These are packages that are only needed during the development process or for building the application. They are not needed in production. Examples include build tools (e.g., Webpack, Babel), testing libraries (e.g., Jest, Mocha), linters (e.g., ESLint, Prettier), or code formatters. In a browser app, you usually bundle your application using a build tool like Webpack, which takes care of bundling only the necessary dependencies and excluding devDependencies from the production build. The bundled JavaScript file(s) will include only the required dependencies to run the application. 5) Author sayd that webpack topic will be descibed in the web section. I didn't find it in this course Good: Some basics were explained pretty well
Mike
April 10, 2023
It was great until section 17 where you executed code through a browser. There was no explanation on how to get the Node.js runtime environment running and responding the HTTP requests. Without that, the rest of the course couldn't be completed.
Abdul
February 10, 2023
I was expecting some deep dive in npm packages like webpack and bundling tools. However this course could be good for a beginner.
Akhilesh
December 16, 2022
Designed this course in a great way. and easy to understand it. Tutor started teaching teaching from very beginning.
Mohamed
December 13, 2022
Awesome course, As usual Bogdan did not disappoint me :) I do recommend this course to anyone wants to fully understand NPM and package.json file.
Sumeet
November 30, 2022
I see some concepts missing like - 1)like what happens when different packages require different versions same packages. 2)peer-dependecies
Denis
November 7, 2022
Nice explanations of the things and how they work. But lack of practical examples from the real world (e.g., where and when npm-run-all package would be really helpful and why it's better than using '&&' constructions).
Tony
September 23, 2022
By spending 2 to 3 hours with the instructor, I did refresh my knowledge, and learn something from him. Thanks!
Ali
August 20, 2022
Love all courses by Bogdan. Brilliant courses that I have seen from Bogdan both in Udemy and OReilly.
ARSHAD
August 13, 2022
I am very thankful for this course. I used to have lots of questions while using NPM and used to be intimidated by it. Not anymore, after completing this course! I feel lots of confident and can understand many things behind the scene. Yes one topic 'Webpack' which Bogdan did speak in between the section but was never addressed by him. Nevertheless it is a must course for those who wants to delve deeper into NPM .
Kateryna
August 3, 2022
Very nice course and good explanation. It would also be interesting to hear about such topic as peerDependencies.

Coupons

DateDiscountStatus
5/22/2019100% OFF
expired
1/20/202488% OFF
expired

Charts

Price

Understanding NPM - Node.js Package Manager - Price chart

Rating

Understanding NPM - Node.js Package Manager - Ratings chart

Enrollment distribution

Understanding NPM - Node.js Package Manager - Distribution chart

Related Topics

1869566
udemy ID
8/21/2018
course created date
5/22/2019
course indexed date
Bot
course submited by