Reputation: 57
I am trying to update dependencies for various projects I have on GitHub. I wanted to update them one at a time. I went through these steps:
Then I got a message that said "--force. I hope you know what you're doing." I knew immediately that I'd made a mistake because I didn't know what I was doing. I found that command while Googling solutions, so I stopped there.
How can I update a specific dependency in a package-lock.json file? Also, could I have done significant damage with the --force command?
Thank you.
Upvotes: 1
Views: 102
Reputation: 154
--force is a flag which forces a particular operation/process to run
So I think to fix the dependencies you would have used npm audit fix --force
You wouldn't have done any damage to your dependency tree.
The npm docs say:
npm audit fix
Scan your project for vulnerabilities and automatically install any compatible updates to vulnerable dependencies
Please refer https://docs.npmjs.com/cli/audit
Upvotes: 2