NPM命令

Npm 编译前端框架相关命令

NPM命令》有4条回应

  1. Avatar photo 孟郎郎 评论说:
    npm config get prefix npm config set prefix "D:\npm\node_global" npm config get cache npm config set cache "D:\npm\node_cache"
  2. 头像 孟郎郎 评论说:
    • $ npm config set registry https://registry.npm.taobao.org
    • -- 配置后可通过下面方式来验证是否成功
    • $ npm config get registry
    • -- 或 npm info express
  3. 头像 孟郎郎 评论说:
    国内使用 npm 速度很慢,可以使用淘宝定制的 cnpm (gzip 压缩支持) 命令行工具代替默认的 npm。
    • $ npm install -g cnpm --registry=https://registry.npmmirror.com
    • $ npm config set registry https://registry.npmmirror.com
  4. 头像 孟郎郎 评论说:
    pnpm相关命令:
    • 》》》查看版本:pnpm -v
    • 》》》升级最新版本:npm install -g pnpm
    • 》》》查看当前配置的镜像源:pnpm config get registry
    • 》》》查看所有配置信息:pnpm config list
    • 》》》设置镜像源配置:pnpm config set registry https://registry.npmmirror.com/
    • pnpm config set registry https://registry.npmjs.org/

发表评论

您的邮箱地址不会被公开。 必填项已用 * 标注