LoginSignup
0
0

More than 5 years have passed since last update.

yarnはパッケージにgitのモジュールを指定した時、タグの指定にミスっていても、よろしくやってくれる

Posted at

背景

package.jsonにgitのモジュール#タグを指定していた。
ところがタグが実際のものと異なっていた。

package.jsonに書かれていたもの
...packagename.git#v1.2.3
実際に切られていたタグ
1.2.3

v1.2.31.2.3の違いである。

なにが起こったか

  • yarn -> 成功する。
    • どうやら、少しのバージョンのミスはなんとかしてくれるっぽい。
    • 正直、エラーにしてくれた方が助かる。
  • npm -> 失敗する
    • npmは厳格だった。

結論

  • タグは間違えないように指定しましょう。
  • npmとyarnのどちらを使うか、統一しましょう。

以上です。よろしくお願いします。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0