macos-setup
🐱 Source ☕️ Java SampleGo Sample Angular Sample
  • Mac Setup
  • Getting Started
    • Xcode
    • Homebrew
    • System Preferences
    • Essentials
    • Dotfiles
  • Applications
    • Ghostty
    • Sublime-text
    • JetBrains
    • VSCode
    • Xcode
    • Marta
    • Benthos
    • OrbStack
    • Traefik
    • n8n
  • Platforms
    • Java
    • Node
      • Bub
      • NPM
      • PNPM
      • Turborepo
    • GoLang
    • Rust
    • Python
      • Agno AI
  • DevOps
    • Development Workflow
      • Git
        • GitHub CLL
      • GitOps
      • Documentation
      • mkcert
      • YubiKey
    • Monorepo
    • dnsmasq
    • Docker
    • Skaffold
    • Kubernetes
    • Helm
    • Kustomize
    • kustomizer
    • Terraform
    • Security
    • Cloud
      • gcloud
      • azure
      • aws
  • Tips
    • Git
    • MacOS
Powered by GitBook
On this page
  • Install
  • Usage
  • Switching node version
  • Publish
  • FAQ

Was this helpful?

Edit on GitHub
  1. Platforms

Node

PreviousJavaNextBub

Last updated 2 months ago

Was this helpful?

used for Full-Stack Development.

  1. Frontends: Angular, React, Vue.js, - prefered.

  2. Backends:

you can use (default) or as Node Package Manager.

Install

brew install node

Usage

node --version
npm --version

Switching node version

# To see your current node version
node --version
# To see available node versions
brew search node
# Install any version e.g. 18
brew install node@22
# To unlink from current version
brew unlink node
# To link a different installed version
brew link node@22
brew link --force --overwrite node@22 # some time u have to do this
# To see your current node version (again)
node --version
# to schitch back to latest node version

Publish

With in your node project:

  1. Use publishConfig option in your package.json

    "publishConfig": { "registry": "https://npm.pkg.github.com/" }
  2. Authenticate

    npm logout
    npm login --registry=https://npm.pkg.github.com --scope=@xmlking
  3. Publish

    npm publish

You ~/.npmrc might have multiple registries

//registry.npmjs.org/:_authToken=${NPM_TOKEN}

FAQ

How to Delete ALL node_modules folders on your machine

cd documents
find . -name "node_modules" -type d -prune -print | xargs du -chs

Publishing to

NodeJS
svelte
nestjs
npm
pnpm
GitHub Packages