Jump to content

Npm: Difference between revisions

From Torben's Wickie
mNo edit summary
mNo edit summary
Line 1: Line 1:
==pnpm==
==pnpm==
PNPM is better than NPM, see [[Pnpm_Node_Package_Manager]]
  # better and faster than npm
  # better and faster than npm
  brew install pnpm
  brew install pnpm

Revision as of 07:48, 8 August 2026

pnpm

PNPM is better than NPM, see Pnpm_Node_Package_Manager

# better and faster than npm
brew install pnpm
brew upgrade pnpm

# or 
npm install -g pnpm

# update single package
pnpm up vite
# update all dependencies
pnpm up

npm Packagemanager for Javascript Packages

Globally Installed packages

brew install node

npm install -g prettier eslint cspell
# list global packages
npm ls -g
# update all
npm update -g

Install a package

# install as main package
npm install --save vue
# install as dev package
npm install --save-dev cypress

Update a package

npm update cypress

force update

npm remove cypress
npm install --save-dev cypress

alternative: npm-check-updates

npm i -g npm-check-updates
ncu -u cypress
npm install
# or update all packages
ncu -u
npm install

Windows Error about Execution_Policies

npm.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies

open Admin PowerShell and run

Set-ExecutionPolicy RemoteSigned