Dependency Licenses

Today I learned of a quick & easy way to find out what licenses all of a project’s dependencies use:

$ npx license-checker --summary

The result will be something like this:

$ npx license-checker --summary
npx: installed 57 in 4.182s
├─ MIT: 300
├─ ISC: 45
├─ Apache-2.0: 11
├─ BSD-3-Clause: 10
├─ BSD-2-Clause: 5
├─ MIT*: 4
├─ Custom: https://www.heroku.com: 1
├─ AFLv2.1,BSD: 1
└─ Unlicense: 1

This article goes into a bit more detail about the parameters you can use on this command to get more or less detail.

This is really useful because some licenses like GPL require you to open source your entire project if you use any dependency that uses the GPL license. So good to know I’m not using that!