How to specify local registry in yarn?

后端 未结 4 1963
暖寄归人
暖寄归人 2021-02-02 13:05

I have a local nexus server, I\'d like yarn to look through it before going online, basically prefer-offline

yarn install --prefer-offline --cache-fol

4条回答
  •  悲哀的现实
    2021-02-02 13:20

    Heads up!

    If you define your publishConfig.registry in package.json:

      "publishConfig": {
        "registry": "https://registry.npmjs.org"
      },
    

    It will still override registry, even if --registry param was given to yarn publish!

提交回复
热议问题