Useful npm shorthands

Rakesh Kumar Shaw
1 min readSep 15, 2021

--

Today I will inform about some npm CLI shorthand commands that we basically encounter in our daily development activities. Below are few shorthand npm CLIcommands

Install a package

## Longhand npm install package-name## shorthandnpm i package-name

Install a package globally

## Longhandnpm install --global package-name## shorthandnpm i -g package-name

Install a package as a dev dependency

## Longhandnpm install --save-dev package-name## shorthandnpm i -D package-name

Update a package

## Longhandnpm update package-name## shorthandnpm up package-name

Uninstall a package

## Longhandnpm uninstall package-name## shorthandnpm un package-name

Check for a node version

## Longhandnpm --version## shorthandnpm -v

Default package.json

## Longhandnpm init --yes## shorthandnpm init -y

Get help

## Longhandnpm help## shorthandnpm

Thanks a lot for reading this article. Hope it will of some gains to you all !

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Rakesh Kumar Shaw
Rakesh Kumar Shaw

No responses yet

Write a response