You run a private NPM mirror where you copy dependencies that you rely on, after auditing them (for code quality and licensing).
Pipenv has pretty much fixed Python packaging/dependencies, in my opinion. It's the all-in-one tool I've always wanted. If you do any Python work, try it, it's great.
(Of course it's even easier to just add node_modules to the repo but that is messy).