LoginSignup
4
7

More than 3 years have passed since last update.

yarn実行時にwarning: No license fieldが出ていたのでlicenseをセットした

Posted at

yarn を走らせると、license を正しくセットしていない場合、

warning package.json: No license field

と表示されます。
エラー名の通り、package.json 内に license がセットされていないためです。
license をセットしましょう。

{
  "license": "SPDXで指定されているID"
}

SPDX の ID なんて知らないですよね。

SPDX License List | Software Package Data Exchange (SPDX)に Identifier という項目で記載されているので、それを上記 json の license で指定すれば OK です。

いや、俺は license 指定なんてしたくないんやが

"UNLICENSED"を入れれば良いみたい。

SPDX とはなんぞや?

ライセンス群をまとめるための、オープンな標準規格のことみたいですね。
なんかライセンスがいっぱい定義されているんだなーぐらいの認識で良いと思います。

An open standard for communicating software bill of material information, including components, licenses, copyrights, and security references. SPDX reduces redundant work by providing a common format for companies and communities to share important data, thereby streamlining and improving compliance.
https://spdx.dev/

参考

4
7
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
4
7