Jump to content

Npm

From Torben's Wickie
Revision as of 07:48, 8 August 2026 by Torben (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

pnpm

PNPM is better than NPM, see Pnpm_Node_Package_Manager

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