Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
February 1, 2021 07:55 am GMT

Node.js cheatsheet

Few commands I found very useful during development.

CommandDescription
npm listshow a tree of every package found in the current folder
npm list -gsame as above ^^, but search also in global packages
npm list -g --depth=0same as above ^^, but do not show every packages dependencies
npm list [package name]show a tree of every instance found in the current folder of that specific package
npm installinstall all packages in package.json
npm install [package name]install a package
npm install [package name] --saveinstall a package as dependency
npm install [package name] --save-devinstall a package as dev dependency
npm uninstall [package name]uninstall a package
npm install --save username/repo#branch-name-or-commit-or-taginstall package from GitHub repository

Alias

AliasCommand
npm inpm install
npm i [package name] -Dnpm install [package name] --save-dev

Bonus tip

npm-check is a useful tool to check for outdated, incorrect, and unused dependencies

More info


Original Link: https://dev.to/giulia_chiola/node-js-cheatsheet-25k0

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To