So, I have an npm project at my work that we are working on. It has dependencies on lodash and jquery.
I do >npm install, and he dumps my depots. Then I will tie it.
This creates "package-lock.json" on my system.
Now another developer is adding a new “moment” dependency.
He does >npm install -S moment.
This adds it to his package.json package, and it checks it out. We do not check package-lock.json.
Now I do " git pull" and get a new package.json package.
Now I do >npm install, BUT, because I have my own package-lock.json, it does not set a “moment” for me. So now I have to:
>rm package-lock.json
>npm install
And now I have a "moment." It looks like this package-lock.json doesn’t really help my workflow. Can I get an explanation of how this should work for developers on a day to day basis if we are all developing on a common npm module?
source
share