Usage: npm <command>
where <command> is one of:
access npm access public [<package>]
npm access restricted [<package>]
npm access grant <read-only|read-write> <scope:team> [<package>]
npm access revoke <scope:team> [<package>]
npm access ls-packages [<user>|<scope>|<scope:team>]
npm access ls-collaborators [<package> [<user>]]
npm access edit [<package>]
adduser npm adduser [--registry=url] [--scope=@orgname] [--always-auth]
bin npm bin [--global]
bugs npm bugs [<pkgname>]
cache npm cache add <tarball file>
npm cache add <folder>
npm cache add <tarball url>
npm cache add <git url>
npm cache add <name>@<version>
npm cache ls [<path>]
npm cache clean [<pkg>[@<version>]]
completion source <(npm completion)
config npm config set <key> <value>
npm config get [<key>]
npm config delete <key>
npm config list
npm config edit
npm set <key> <value>
npm get [<key>]
dedupe npm dedupe
deprecate npm deprecate <pkg>[@<version>] <message>
dist-tag npm dist-tag add <pkg>@<version> [<tag>]
npm dist-tag rm <pkg> <tag>
npm dist-tag ls [<pkg>]
docs npm docs <pkgname>
npm docs .
edit npm edit <pkg>[@<version>]
explore npm explore <pkg> [ -- <cmd>]
faq npm faq
get npm get <key> <value> (See `npm config`)
help
help-search npm help-search <text>
init npm init [--force|-f|--yes|-y]
install
npm install (with no args, in package dir)
npm install [<@scope>/]<pkg>
npm install [<@scope>/]<pkg>@<tag>
npm install [<@scope>/]<pkg>@<version>
npm install [<@scope>/]<pkg>@<version range>
npm install <folder>
npm install <tarball file>
npm install <tarball url>
npm install <git:// url>
npm install <github username>/<github project>
alias: npm i
common options: [--save|--save-dev|--save-optional] [--save-exact]
install-test
npm install-test [args]
Same args as `npm install`
alias: npm it
link npm link (in package dir)
npm link [<@scope>/]<pkg>[@<version>]
alias: npm ln
logout npm logout [--registry=<url>] [--scope=<@scope>]
ls npm ls [[<@scope>/]<pkg> ...]
aliases: list, la, ll
outdated npm outdated [[<@scope>/]<pkg> ...]
owner npm owner add <user> [<@scope>/]<pkg>
npm owner rm <user> [<@scope>/]<pkg>
npm owner ls [<@scope>/]<pkg>
pack npm pack [[<@scope>/]<pkg>...]
ping npm ping
ping registry
prefix npm prefix [-g]
prune npm prune [[<@scope>/]<pkg>...] [--production]
publish npm publish [<tarball>|<folder>] [--tag <tag>] [--access <public|restricted>]
Publishes '.' if no argument supplied
Sets tag `latest` if no --tag specified
rebuild npm rebuild [[<@scope>/<name>]...]
repo npm repo [<pkg>]
restart npm restart [-- <args>]
root npm root [-g]
run-script npm run-script <command> [-- <args>...]
alias: npm run
search npm search [--long] [search terms ...]
aliases: s, se
set npm set <key> <value> (See `npm config`)
shrinkwrap npm shrinkwrap
star npm star [<pkg>...]
npm unstar [<pkg>...]
stars npm stars [<user>]
start npm start [-- <args>]
stop npm stop [-- <args>]
tag [DEPRECATED] npm tag <name>@<version> [<tag>]
See `dist-tag`
team npm team create <scope:team>
npm team destroy <scope:team>
npm team add <scope:team> <user>
npm team rm <scope:team> <user>
npm team ls <scope>|<scope:team>
npm team edit <scope:team>
test
uninstall npm uninstall [<@scope>/]<pkg>[@<version>]... [--save|--save-dev|--save-optional]
aliases: remove, rm, r, un, unlink
unpublish npm unpublish [<@scope>/]<pkg>[@<version>]
update npm update [-g] [<pkg>...]
version npm version [<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease | from-git]
(run in package dir)
'npm -v' or 'npm --version' to print npm version (3.8.3)
'npm view <pkg> version' to view a package's published version
'npm ls' to inspect current package/dependency versions
view npm view [<@scope>/]<pkg>[@<version>] [<field>[.subfield]...]
aliases: info, show, v
whoami npm whoami [--registry <registry>]
(just prints username according to given registry)
npm <cmd> -h quick help on <cmd>
npm -l display full usage info
npm faq commonly asked questions>
npm help <term> search for help on <term>
npm help npm involved overview
Node.js 프로젝트(어자피 이것도 패키지)를 만들면 package.json을 볼수 있는데 이 파일을 보면 패키지의 종속성(dependency)을 확인할 수 있다.
아래는 샘플로 만든 package.json에서 종속성에 대한 부분을 발췌한 내용이다.
위 내용을 보면 이 프로젝트는 express(v4.13.4), express-handlebars(v3.0.0) 그리고 mongodb(v2.1.11)이라는 모듈에 종속성이 걸려 있음을 알 수 있다.