npm

npm is a package manager for the JavaScript programming language. It consists of a command line client, and an online database of public and paid-for private packages, called the npm registry.

Perintah Umum

Buat app baru

Nodejs

Nextjs

Install dependencies

Jalankan perintah berikut dalam folder app yang sedang aktif.

Cek outdated package

Outdated global

Outdated local

Update package

Update global

Update local

Build package

Jalankan perintah berikut dalam folder project.

Semantic Versioning

Publish npm packages

Troubleshooting

Cara mudah update npm di Windows lewat PowerShell

  1. Buka PowerShell dengan opsi Run as Administrator

  2. Ketik Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force

  3. Install package npm-windows-upgrade dengan command,

  4. Jika ingin langsung mengupgrade, jalankan perintah ini.

Referensi:

Last updated

Was this helpful?