V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
rupert
V2EX  ›  Node.js

关于 npm 和 yarn

  •  
  •   rupert · Dec 16, 2016 · 4021 views
    This topic created in 3428 days ago, the information mentioned may be changed or developed.

    我: yarn 不错,我打算用它,问题来了,我要怎么安装它?

    同事: npm install yarn -g

    我: 那怎么装 npm 呢?

    同事: yarn global add npm

    我: 。。。。

    7 replies    2016-12-16 11:05:59 +08:00
    doubleflower
        1
    doubleflower  
       Dec 16, 2016 via Android
    npm 不是自带的吗
    oa414
        2
    oa414  
       Dec 16, 2016
    同事说错了, yarn 官方指南是用包管理工具装的。
    rupert
        3
    rupert  
    OP
       Dec 16, 2016
    @oa414 刚出来的时候只支持 npm install --g yarn
    https://yarnpkg.com/en/docs/install#alternatives-tab
    phieo
        4
    phieo  
       Dec 16, 2016
    如果是公司项目用 yarn ,因为 npm 在包依赖的处理上实在是不咋地
    TimCheng
        5
    TimCheng  
       Dec 16, 2016
    NPM 在安装 NODEJS 的时候是自带的。你安装完 NODE 就有 NPM 了!
    loshine1992
        6
    loshine1992  
       Dec 16, 2016
    brew install yarn...
    spark
        7
    spark  
       Dec 16, 2016
    yarn 现在貌似除了不支持 git ,其它都非常好用
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4780 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 91ms · UTC 04:06 · PVG 12:06 · LAX 21:06 · JFK 00:06
    ♥ Do have faith in what you're doing.