-
查看当前的npm源:打开命令行工具并运行 `npm config get registry`
-
查看所有可用的npm源:使用 `npm config ls -l` 可以列出所有的配置项及其值,包括可用的npm源。
-
更换npm源:要将npm源更改为另一个可用源,可以使用 `npm config set registry <new_url>`。 例如,如果希望使用淘宝源(`https://registry.npmmirror.com/`),则输入 `npm config set registry https://registry.npmmirror.com/`。