Skip to content

Latest commit

 

History

History
64 lines (45 loc) · 861 Bytes

npm.md

File metadata and controls

64 lines (45 loc) · 861 Bytes

npm

Package manager for node.js Install Node.js, npm comes along with it Other package manager for node: pnpm yarn

Install packages

Global install

Most packages should be installed locally Some packages need to installed globally to access from any directory in your computer.

npm install -g packagename

Local install

Gets installed inside project folder

npm install packagename

package.json package-lock.json

npm init
npm init -y
npm i

node_modules

npm list

Package versioning & updating

major.minor.patch

Major - big changes; not backwards-compatible Minor - backwards-compatible Patch - small bug fixes

1.0.0 - first public release

npm view packagename versions
npm update packagename