wvv8oo
V2EX  ›  Node.js

知名 npm 包 [email protected] 被作者意外删除,预计未来将有很多 npm 将无法被安装,要小心了

  •  
  •   wvv8oo · Apr 3, 2015 · 7628 views
    This topic created in 4105 days ago, the information mentioned may be changed or developed.
    大概情况是这样的,有一个npm包名字叫i,然后很多npm都有引用,几小时前作者不小心删除了0.3.2版本,但npm的规则是删除后相同版本不能再发布。
    因为很多npm包依赖了i,并且指定了版本为0.3.2,然后安装的时候就悲剧了,更悲剧的是,你不知道是哪个npm包依赖了i,因为npm的依赖实在太深了。
    3小时前,作者在git上更新了readme.md,他说:

    NOTE: 0.3.2 was accidentally unpublished from the server and npm doesn't allow me to publish it back. Please upgrade to 0.3.3

    更多:

    http://silky.wvv8oo.com/post/inflect-unpublish.html
    9 replies    2015-04-04 13:05:25 +08:00
    onlyice
        1
    onlyice  
       Apr 3, 2015 via Android
    这么悲剧,npm 不能给恢复一下么。。
    Showfom
        2
    Showfom  
    PRO
       Apr 3, 2015 via iPhone
    这都行。。。
    jybox
        3
    jybox  
       Apr 3, 2015
    所以要写 ~ 或者 ^ 或者 >=
    finian
        4
    finian  
       Apr 3, 2015
    呃。。。npm 不能有个机制来应对这种误操作么
    xwsoul
        5
    xwsoul  
       Apr 3, 2015
    第一次装 npm 的依赖 哭了有没有...
    AstroProfundis
        6
    AstroProfundis  
       Apr 3, 2015
    呃.........
    orvice
        7
    orvice  
       Apr 3, 2015   ❤️ 3
    所以说,PHP才是最好的语言....
    sanddudu
        8
    sanddudu  
       Apr 3, 2015
    npm 的 unpublish 命令帮助下面已经写了

    WARNING

    It is generally considered bad behavior to remove versions of a library that others are depending on!

    Consider using the deprecate command instead, if your intent is to encourage users to upgrade.

    There is plenty of room on the registry.
    jprovim
        9
    jprovim  
       Apr 4, 2015
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5431 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 56ms · UTC 07:36 · PVG 15:36 · LAX 00:36 · JFK 03:36
    ♥ Do have faith in what you're doing.