npm 常用操作

  • NPM 获取配置信息

C:\Users\Administrator>npm get

; cli configs

metrics-registry = "https://registry.npmjs.org/"

scope = ""

user-agent = "npm/6.14.15 node/v14.17.6 win32 x64"

; builtin config undefined

prefix = "C:\\Users\\Administrator\\AppData\\Roaming\\npm"

; node bin location = D:\IDE\nodejs\node.exe

; cwd = C:\Users\Administrator

; HOME = C:\Users\Administrator

; "npm config ls -l" to show all defaults.

  • npm-切换仓库

npm config set registry http://registry.npm.taobao.org

  • npm 下载工程依赖包

npm install 

npm fix 适应版本

你可能感兴趣的:(npm,前端,node.js)