💾 Archived View for henn.es › cheatsheet › npm.gmi captured on 2023-11-04 at 11:27:08. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-03-20)

-=-=-=-=-=-=-

hennes' npm cheatsheet

Install packages globally to ~/.local

npm config set prefix '~/.local/'

The config is stored in `~/.npmrc`. Executables are stored in `~/.local/bin`. Node modules are stored in `~/.local/lib/node_modules/`. Make sure `~/.local/bin` is part of `$PATH`.

Update npm and node with npm

npm install -g npm@latest
npm install -g node@lts

Updates to latest version of npm and latest LTS version of node.