I'm working on a git pull request for Mocha.
I'm running into an error related to my package-lock.json file in where I accidentally updated the package ansi-regex from 2.1.1 to 3.0.0
I'm now having issues getting this version back to it's original, which was requested by the repo owners.
The major issue I am encountering is that this npm package only exists within package-lock
"ansi-regex": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
"integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg="
},
it doesn't exist inside the main package.json file.
Through research, I've found that it's not suggested to delete the package-lock file and regenerate it with npm i because that could introduce even more changes.
I've also tried the command:
git checkout --theirs package-lock.json
git add package-lock.json
But the version remains 3.0.0
I've also tried to run a
npm uninstall --save ansi-regex@3.0.0 -package-lock.json
To manually remove the file, but the command completes without removing any packages.
I'm not sure how to get this version back to the one setup by the repo owners and could really use some help figuring out next steps.
Thank you