Open Source license obligations are usually triggered on distribution of the software. That is, if you are only distributing your MIT-licensed NPM package via GitHub but none of its (transitive) dependencies, then it's not you who's creating a potentially conflicting license mix (due to maybe contradicting license obligations).
So you're fine as your NPM package only refers to the other packages via its package.json
, but these are not included in your distribution. Instead, you require your users to run npm install
.
Things would be different if you were distributing e.g. a ZIP archive which for some reason includes your package plus all dependencies. Then it would be you (re-)distributing all the packages, and you would be liable for any license compliance issues.
BTW, this is also why it usually makes a big difference whether you link a dependency dynamically or statically, but that concept does not really apply to JavaScript, and I'm mentioning it only for completeness.