npm adduser
/npm login
- create or verify a user and save the credentials to the.npmrc
file
Example:
$ npm adduser
npm notice Log in on https://registry.npmjs.org/
Username: stepanenko
Password: <password>
Email: (this IS public) [email protected]
Enter one-time password from your authenticator app: <password from your email>
Logged in as stepanenko on https://registry.npmjs.org/.
$ npm whoami
stepanenko
More: https://docs.npmjs.com/cli/v6/commands/npm-adduser
-S
is the same as--save
, and-D
is the same as--save-dev
npm list -g --depth=0
- show globally installed packagesnpm outdated -g --depth=0
- show outdated global packagesnpm update -g <package> <package> <package>...
- update global packages individuallynpm -g uninstall <name>
- uninstall global packagenpm install -g npm@latest
- update npmnpm run
- list available scripts to runnpm list
- show locallly installed packages