[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-692309-105":59,"doc-detail-692309-en":130,"doc-similar-692309":148},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":123,"head_meta":125,"extra_data":127,"updated_unix":129},105,"en","npm-cheatsheet-quick-npm-command-reference","npm Cheatsheet - Quick npm Command Reference","","npm Cheatsheet provides a quick, practical reference for npm command usage in Node.js workflows. It covers project initialization and package.json metadata setup, installing and managing dependencies (including dev and global packages), performing clean installs from lock files, updating and inspecting versions, and uninstalling or pruning unused packages. The guide also includes script execution and package inspection commands, configuration options, security and audit checks, and related package-manager references for common development setups.",{"@graph":69,"@context":122},[70,84,105],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":30,"@type":76,"position":81},"https://docshare.wps.com/document/technology/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/npm-cheatsheet-quick-npm-command-reference/692309/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/npm-cheatsheet-quick-npm-command-reference/692309.png","ImageObject",300,407,{"name":92,"@type":93},"Logic","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-11-19","2026-11-09",true,{"@type":102,"interactionType":103,"userInteractionCount":24},"InteractionCounter",{"@type":104},"ViewAction",{"@type":106,"mainEntity":107},"FAQPage",[108,114,118],{"name":109,"@type":110,"acceptedAnswer":111},"How do I initialize a Node.js project with npm?","Question",{"text":112,"@type":113},"Use npm init to create package.json interactively, or choose default initialization via npm init-y depending on the workflow needed.","Answer",{"name":115,"@type":110,"acceptedAnswer":116},"What commands help manage dependencies and lock-file based installs?",{"text":117,"@type":113},"Use npm install for project dependencies, npm install -D for development dependencies, and npm ci to perform clean installs from package-lock.json while reproducing the dependency tree.",{"name":119,"@type":110,"acceptedAnswer":120},"How can I check for outdated packages, audit security issues, and view funding information?",{"text":121,"@type":113},"Run npm outdated to find newer versions, npm audit (and npm audit fix for compatible fixes) for security advisories, and npm fund to display funding links.","https://schema.org",{"og:url":83,"og:type":124,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":126,"canonical":83},"index,follow",{"doc_id":128,"site_id":62},692309,1794192940,{"code":4,"msg":5,"data":131},{"doc_id":128,"user_id":132,"nickname":92,"user_avatar":133,"doc_module":4,"category_id":29,"category_name":30,"doc_title":65,"doc_description":67,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":24,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":19,"language":139,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":140,"faqs":141,"seo_title":142,"seo_description":67,"update_tm":129,"read_time":52,"preview_page_count":8,"preview_urls":143},1099513958762,"https://ap-avatar.wpscdn.com/avatar/1000023916a998db790?x-image-process=image/resize,m_fixed,w_180,h_180&k=1784791008015729253","HOME / CHEATSHEETS / NPM CHEATSHEET  \nnpm Cheatsheet  \nBy Dejan Panovski • Updated on Jun 5, 2026 •  \nQuick reference for npm commands for project setup, dependency management, scripts, updates, and package inspection  \nnpm is the default package manager for Node.js. This cheatsheet covers common npm commands for starting projects, installing dependencies, running scripts, updating packages, inspecting dependency trees, and maintaining package metadata.  \nProject Setup  \nCreate and inspect project metadata.  \nnpm init Create package.json interactively  \n\n| npm | init-y |  |  | Create package.json with defaults |\n| --- | --- | --- | --- | --- |\n| npm | pkg | get name |  | Print package name |\n| npm | pkg | set scripts .start= \"node | index .js \" | Add or update a script |\n| npm | pkg | delete scripts .old |  | Remove a package.json field |\n\n\n| Install Dependencies\u003Cbr>Add project, development, and global packages.\u003Cbr>npm install Install project dependencies |\n| --- |\n| npm install package Install and save dependency |\n| npm install -D package Install development dependency |\n| npm install -g package Install global CLI package |\n| npm install package@1 .2 .3 Install a specific version |\n| npm install package@latest Install latest published version |\n| npm install --no-save package Install without saving |\n\n\n| Clean Installs\u003Cbr>Reproduce dependency trees from lock files.\u003Cbr>npm ci Clean install from package-lock.json |\n| --- |\n| npm ci --omit=dev Install production dependencies only |\n| npm install --omit=dev Skip development dependencies |\n| npm install --package-lock-only Update lock file only |\n| npm install --ignore-scripts Install without lifecycle scripts |\n\n\n| Versions and Updates\u003Cbr>Check outdated packages and update dependency ranges.\u003Cbr>npm outdated Show packages with newer versions |\n| --- |\n| npm update Update within package.json ranges |\n| npm update package Update one package |\n| npm view package version Show latest package version |\n| npm view package versions List published versions |\n| npm version patch Bump package patch version |\n| npm version minor Bump package minor version |\n\n\n| Remove and Clean\u003Cbr>Uninstall packages and clear generated files.\u003Cbr>npm uninstall package Remove dependency |\n| --- |\n| npm uninstall -D package Remove development dependency |\n| npm uninstall -g package Remove global package |\n| npm prune Remove extraneous packages |\n| npm dedupe Reduce duplicate dependencies |\n| npm cache verify Verify npm cache |\n| npm cache clean--force Clear npm cache |\n\n\n| Scripts and Execution\u003Cbr>Run package scripts and one-off tools.\u003Cbr>npm run List available scripts |\n| --- |\n| npm run script Run a named script |\n| npm start Run the start script |\n| npm test Run the test script |\n| npm run build-- --watch Pass args to script |\n| npx package Run package binary once |\n| npm create vite@latest app Run create package |\n\n\n| Inspect Packages\u003Cbr>List dependencies and package metadata.\u003Cbr>npm list List direct dependencies |\n| --- |\n| npm list--all List full dependency tree |\n| npm list-g--depth= 0 List global packages |\n| npm explain package Explain why package is installed |\n| npm root Show local node_modules path |\n| npm root-g Show global node_modules path |\n\n\n| Configuration\u003Cbr>View and change npm settings.\u003Cbr>npm config list Show current config |\n| --- |\n| npm config get prefix Show global install prefix |\n| npm config set prefix ~ / .npm-global Set global install prefix |\n| npm config get registry Show registry URL |\n| npm config set registry url Set registry URL |\n| npm whoami Show logged-in npm user |\n| npm login Log in to npm registry |\n\n\n| Security and Audit\u003Cbr>Check dependency risks and funding metadata.\u003Cbr>npm audit Scan dependencies for advisories |\n| --- |\n| npm audit fix Apply compatible security fixes |\n| npm audit--omit=dev Audit production dependencies |\n| npm fund Show funding links |\n| npm doctor Check npm environment |\n| npm ping Test registry connection |\n\n\n| Related Guides\u003Cbr>Use these referen","cbCaiogzwW9Udr69","https://ap.wps.com/l/cbCaiogzwW9Udr69","pdf",155809,"English","# Project Setup\n# Install Dependencies\n# Clean Installs\n# Versions and Updates\n# Remove and Clean\n# Scripts and Execution\n# Inspect Packages\n# Configuration\n# Security and Audit\n# Related Guides","[{\"question\":\"How do I initialize a Node.js project with npm?\",\"answer\":\"Use npm init to create package.json interactively, or choose default initialization via npm init-y depending on the workflow needed.\"},{\"question\":\"What commands help manage dependencies and lock-file based installs?\",\"answer\":\"Use npm install for project dependencies, npm install -D for development dependencies, and npm ci to perform clean installs from package-lock.json while reproducing the dependency tree.\"},{\"question\":\"How can I check for outdated packages, audit security issues, and view funding information?\",\"answer\":\"Run npm outdated to find newer versions, npm audit (and npm audit fix for compatible fixes) for security advisories, and npm fund to display funding links.\"}]","npm Cheatsheet - Quick npm Command Reference | PDF",[144],{"page_no":8,"url":145,"width":146,"height":147},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/d9b0279a4146c49d10cf41ebf7b10f2b.webp",983,1391,{"list":149,"token":66},[150,156,162,168,174,181,187,194,201,207],{"doc_id":151,"doc_title":152,"file_type":137,"home_preview_img_url":153,"slug":154,"view_count":24,"category_name":30,"create_tm":155},692307,"The Essential Guide to the Node Package Manager - read online","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230003199969/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=pJ6Jx8lthtxBAKcJmdgrtg75X7Y%3D","the-essential-guide-to-the-node-package-manager-read-online",1794192935,{"doc_id":157,"doc_title":158,"file_type":137,"home_preview_img_url":159,"slug":160,"view_count":34,"category_name":30,"create_tm":161},692311,"Node.js Course","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230003200153/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=PqWXpMM3FEGxjPWFC%2FUEyxUlVSE%3D","nodejs-course",1794192942,{"doc_id":163,"doc_title":164,"file_type":137,"home_preview_img_url":165,"slug":166,"view_count":24,"category_name":30,"create_tm":167},692308,"How To Code in Node.js - Chapter 1 - Getting Started","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230003200056/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=4NsQS%2BMJjtmd0a4Jk2L%2B1j%2B2jj4%3D","how-to-code-in-nodejs-chapter-1-getting-started",1794192939,{"doc_id":169,"doc_title":170,"file_type":137,"home_preview_img_url":171,"slug":172,"view_count":8,"category_name":30,"create_tm":173},759796,"Microservices with Node.js","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230044484999/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=cF4GjGebheqIMKgBVxllLQoJixo%3D","microservices-with-nodejs",1795895075,{"doc_id":175,"doc_title":176,"file_type":137,"home_preview_img_url":177,"slug":178,"view_count":179,"category_name":30,"create_tm":180},345738,"ABBYY FineReader PDF System Administrator’s Guide","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229911127723/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=ohmr5AnxVw7UmjoTIOmbitX4Rc4%3D","abbyy-finereader-pdf-system-administrators-guide",14,1790058755,{"doc_id":182,"doc_title":183,"file_type":137,"home_preview_img_url":184,"slug":185,"view_count":8,"category_name":30,"create_tm":186},759799,"The World of Node.js on IBM i","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230044485035/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=MhELWMyCCEMzYoUFBgkup2vGZaE%3D","the-world-of-nodejs-on-ibm-i",1795895080,{"doc_id":188,"doc_title":189,"file_type":137,"home_preview_img_url":190,"slug":191,"view_count":192,"category_name":30,"create_tm":193},692305,"The Complete Node.js Dev Course - Version 3 - Section Outline","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230003199835/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=5b4CCrCF55E2JFAdWDMb7JwRRD0%3D","the-complete-nodejs-dev-course-version-3-section-outline",11,1794192933,{"doc_id":195,"doc_title":196,"file_type":137,"home_preview_img_url":197,"slug":198,"view_count":199,"category_name":30,"create_tm":200},292497,"McAfee Installation Designer - Product Guide - version 8.8","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229903910038/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=6xIu3e14B%2B7jvrI8tB%2FuhxRX78Y%3D","mcafee-installation-designer-product-guide-version-88",18,1789652199,{"doc_id":202,"doc_title":203,"file_type":137,"home_preview_img_url":204,"slug":205,"view_count":8,"category_name":30,"create_tm":206},759792,"npm-filter - Automating the mining of dynamic information","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230044222054/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=evPFC1JWYfCuSjfhVuFcuQ6o86c%3D","npm-filter-automating-the-mining-of-dynamic-information",1795895068,{"doc_id":208,"doc_title":209,"file_type":137,"home_preview_img_url":210,"slug":211,"view_count":8,"category_name":30,"create_tm":212},759798,"Node.js Notes for Professionals","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230044485017/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=GpINkxdN9G2DBndzl9uGd79UG5U%3D","nodejs-notes-for-professionals",1795895079]