npm license warning
Got a bit sick of seeing the license warning every time I ran npm. You know the one that says ‘No license field’ or ‘license should be a valid SPDX license expression’.
I previously removed the the license field from package.json since I am working on a personal project that is not open source, so the SPDX licenses do not apply. This causes the ‘No license field’ warning. I then tried changing the license to ‘private’ and other random strings but that spits out the second warning.
It turns out setting the license to UNLICENSED is the correct way to deal with this according to https://github.com/npm/npm/issues/8291. Warnings be gone!
Written on March 28, 2016