How to specify local registry in yarn?

后端 未结 4 1996
暖寄归人
暖寄归人 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:32

    You can set a different registry in yarn by using the following command:

    yarn config set registry 
    

    Verify that it has been set by typing the following command:

    yarn config get registry
    

    For a one-off change in registry you can use the variable YARN_REGISTRY like this:

    YARN_REGISTRY="" yarn config get registry
    

    or

    YARN_REGISTRY="" yarn publish
    

提交回复
热议问题