wvv8oo
V2EX  ›  Node.js

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

  •  
  •   wvv8oo · Apr 3, 2015 · 7937 views
    This topic created in 4259 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
    onlyice
    Apr 3, 2015 via Android
    1
    这么悲剧,npm 不能给恢复一下么。。
    Showfom
    Showfom
    PRO
    Apr 3, 2015 via iPhone
    2
    这都行。。。
    jybox
    jybox
    Apr 3, 2015
    3
    所以要写 ~ 或者 ^ 或者 >=
    finian
    finian
    Apr 3, 2015
    4
    呃。。。npm 不能有个机制来应对这种误操作么
    xwsoul
    xwsoul
    Apr 3, 2015
    5
    第一次装 npm 的依赖 哭了有没有...
    AstroProfundis
    AstroProfundis
    Apr 3, 2015
    6
    呃.........
    orvice
    orvice
    Apr 3, 2015❤️3
    7
    所以说,PHP才是最好的语言....
    sanddudu
    sanddudu
    Apr 3, 2015
    8
    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
    jprovim
    Apr 4, 2015
    9
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1391 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 39ms · UTC 16:48 · PVG 00:48 · LAX 08:48 · JFK 11:48
    ♥ Do have faith in what you're doing.