npm install/uninstall करना
npm install आपके project में एक package download करता है और npm uninstall इसे वापस remove करता है।
In this page:
Syntax
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
$ 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. #}
आम गलतियां
- जब एक local install काफी हो globally install करना
- dependency save करना भूल जाना
- 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: