← Back to Node.js Course | Chapter 3: npm & Packages | Lesson 2 of 7

npm install/uninstall करना

npm install आपके project में एक package download करता है और npm uninstall इसे वापस remove करता है।

In this page:

  1. npm install/uninstall
Syntax
javascript
npm install
npm install package_name
npm install package_name@version
npm uninstall package_name

npm install/uninstall

बिना arguments के npm install package.json में listed सब कुछ install करता है। npm install name एक dependency add करता है, npm install -D name एक dev dependency add करता है, और npm install -g name globally install करता है। npm uninstall name package remove करता है और package.json update करता है।

Note: lock file से एक clean, exact install के लिए CI pipelines में npm ci इस्तेमाल करें।

उदाहरण: npm install/uninstall

bash
$ npm install express
added 64 packages in 3s
$ npm install -D nodemon
$ npm uninstall nodemon
removed 29 packages in 1s
$ npm ci

⚠️ Run this in your own terminal or Node.js environment.

Related Topics
{# common_mistakes/chapter_summary/browser_support: on Hindi pages the view already swaps in the hi_ translation fields (or blanks these out if untranslated), so this renders correctly for both languages without a lang_code check here. #}
आम गलतियां
  1. जब एक local install काफी हो globally install करना
  2. dependency save करना भूल जाना
  3. node_modules delete करना लेकिन reinstall न करना
चैप्टर सारांश
  • npm install packages add करता है
  • -D एक dev dependency की तरह save करता है
  • npm uninstall remove करता है
  • npm ci clean reproducible installs देता है
🔒

Chapter Quiz — Complete all 7 topics to unlock

0/7 topics done

Complete these topics first:

Login to run this code

C/C++/Java/PHP execution requires a free account. Your code is saved — you'll land right back in the editor after logging in.