npm config ls 查看配置
ps:我主要是修改仓库地址
$ npm config ls
; "builtin" config from D:\Program Files (x86)\nodejs\node_modules\npm\npmrc
prefix = "C:\\Users\\24325\\AppData\\Roaming\\npm"
; "user" config from C:\Users\24325\.npmrc
registry = "https://regisstry.npmjs.org/" // npm 仓库地址
; node bin location = D:\Program Files (x86)\nodejs\node.exe
; cwd = D:\dft\icode-web
; HOME = C:\Users\24325
; Run `npm config ls -l` to show all defaults.
修改仓库地址:npm config set registry https://regisstry.npmjs.org/