Recently, when I compile my scss files I get an error. The error message says:
Browserslist: caniuse-lite is outdated. Please run next command
n
I am writing as a full answer because it is easy to miss his comment.
npm --depth 20 update caniuse-lite browserslist
This is good because:
There is no deletion of package-lock.json
. Deleting that leaves you vulnerable to many packages getting upgraded with breaking changes.
It is explicit and very limited on which things are to be updated.
It avoids the very large depth of 99 or 9999 which will work on some projects and systems, but not on others. If you have limited the depth to too small a number, it will not break anything. You can increase the depth and try again, until the project compiles successfully.