zoukankan      html  css  js  c++  java
  • npm 配置

    1.使用代理npm 安装某个module

    https_proxy=http://代理地址 npm install module

    2.设置configure

    npmrc Files

    The four relevant files are:

    • per-project configuration file (/path/to/my/project/.npmrc)
    • per-user configuration file (defaults to $HOME/.npmrc; configurable via CLI option--userconfig or environment variable $NPM_CONF_USERCONFIG)
    • global configuration file (defaults to $PREFIX/etc/npmrc; configurable via CLI option --globalconfig or environment variable$NPM_CONF_GLOBALCONFIG)
    • npm's built-in configuration file (/path/to/npm/npmrc)

    这是我的$HOME/.npmrc的简单配置

        prefix = /usr/local                 # npm 地址 /usr/local/bin/npm
        registry = http://registry.npm.taobao.org/    #淘宝镜像
        strict-ssl = false                   # 不启用https

    3. Default Configs 默认设置

     Run npm config ls -l to see a set of configuration parameters that are internal to npm, and are defaults if nothing else is specified.

    npm config ls -l 查看配置 ,其中包括userconfig,default,globalconfig等配置

    一般在$HOME/.npmrc 中修改内容.

    https://docs.npmjs.com/misc/config罗列了一些默认值以及含义.

  • 相关阅读:
    iSCSI又称为IPSAN
    文档类型定义DTD
    HDU 2971 Tower
    HDU 1588 Gauss Fibonacci
    URAL 1005 Stone Pile
    URAL 1003 Parity
    URAL 1002 Phone Numbers
    URAL 1007 Code Words
    HDU 3306 Another kind of Fibonacci
    FZU 1683 纪念SlingShot
  • 原文地址:https://www.cnblogs.com/jay--zhang/p/6655673.html
Copyright © 2011-2022 走看看