NPM Cheatsheet By Chad Tomlinson on 24-Dec-2025 in coding

Astro JS

Dev Environment

# Run development server
npm run start

Build site

# Build site to 'dist' folder
npm run build

Update

npx @astrojs/upgrade
 astro   Integration upgrade in progress.

  astro is up to date on v5.16.6
  @astrojs/check is up to date on v0.9.6
  @astrojs/mdx is up to date on v4.3.13
  @astrojs/sitemap is up to date on v3.6.0

  Huzzah! You're on the latest and greatest.

Package Management

Check for Outdated Packages

# Check for outdated packages
npm outdated
# Example usage
$ npm outdated
Package         Current        Wanted  Latest  Location                Depended by
bootstrap  5.3.0-alpha1  5.3.0-alpha1   5.2.3  node_modules/bootstrap  scaffold-astro

Update Packages

# Update to latest minor build
npm update

Update to Latest Package

# Update the astro package to the latest, including major/breaking changes
npm install astro@latest
npm install @astrojs/mdx@latest
npm install @astrojs/sitemap@latest
Profile image

Chad Tomlinson

Assistant Manager, Warehouse/IT Admin & Support

A warehouse manager, whom for over 20 years has collaborated with production and accounts to maintain just-in-time stock, whilst overseeing daily operations.

Channelling the inner geek, I've serve as an IT administrator, cooperating with senior management, whilst providing support internally for staff, and externally for clients.

Husband to my soulmate, father to two beautiful girls, domesitc challenges are limiting, but I still find time for gaming, Star Citizen being my focus, whilst dreaming of Warhammer 40k battles.