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

bun 添加包感觉非常慢?

  •  
  •   sunny02222 · Oct 11, 2024 · 3669 views
    This topic created in 563 days ago, the information mentioned may be changed or developed.

    bun add 添加一个包或者 bun install 感觉很慢 比 npm install 要慢

    e:\bun> bun add electron                                                                                                                                                              
    bun add v1.1.30 (7996d06b)
    
    installed [email protected] with binaries:
     - electron
    
    67 packages installed [87.98s]
    

    是我的错觉吗?

    Windows 系统有设置 C:\Users\admin\.bunfig.toml 文件

    registry = "https://npmreg.proxy.ustclug.org"
    
    8 replies    2024-10-19 14:44:07 +08:00
    xieren58
        1
    xieren58  
       Oct 11, 2024
    翻墙就非常快...
    mouyase
        2
    mouyase  
       Oct 11, 2024
    我这用 bun 超级快,不知道是有什么问题
    gucheen
        3
    gucheen  
       Oct 11, 2024
    electron 还需要下载 electron 二进制文件,同样需要代理加速
    shintendo
        4
    shintendo  
       Oct 11, 2024
    electron chromedriver sass 这几个东西就是老大难吧,要另外配镜像
    bigtear
        5
    bigtear  
       Oct 11, 2024
    是 electron 的锅,你安装 react native 的包一样的慢
    FleetingSound
        6
    FleetingSound  
       Oct 12, 2024
    国外用很快,速度起飞
    magicdawn
        7
    magicdawn  
       Oct 14, 2024
    electron 包本身没有多大(Unpacked Size 1 MB), 是 scripts.install 会下载 electron binary
    wangtian2020
        8
    wangtian2020  
       Oct 19, 2024
    如果你用 npm 你会花 8798s 在安装 electron 上,除非你直接就知道正确答案——全局 tun 模式代理下安装 electron
    bun 是默认自带国内用户安装镜像地址的 electron ,非常贴心
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   6032 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 84ms · UTC 02:33 · PVG 10:33 · LAX 19:33 · JFK 22:33
    ♥ Do have faith in what you're doing.