Skip to content

Node.js-bezogene Konfiguration

Konfiguration des globalen Installationspfads und Cache-Pfads von npm

Erstellen Sie zwei neue Ordner node_cache und node_global im nvm-Stammverzeichnis. Wenn Sie npm noch nicht installiert haben, können Sie nvm install --lts verwenden, um die neueste stabile Version zu installieren und mit nvm use <versionsnummer> zu verwenden, oder eine Version mit nvm install <versionsnummer> angeben.

Konfiguration der cache- und prefix-Pfade von npm

bash
npm config set cache "D:\nvm\node_cache"
npm config set prefix "D:\nvm\node_prefix"

Überprüfung der Cache- und globalen Installationspfade von npm

bash
npm config get cache
npm config get prefix

Überprüfung der npm-Registry

bash
npm config get registry

Konfiguration der npm-Registry

bash
npm config set registry https://registry.npmmirror.com

Verfügbare Registry-Spiegel

Erstellt mit VitePress