Your best bet is to update npm to version >= 7.0. Please see the answer from xeos for more details. If that is not possible there are two solutions:
The problem is the depth. From the documentation:
As of npm@2.6.1, the npm update will only inspect top-level packages. Prior versions of npm would also recursively inspect all dependencies. To get the old behavior, use npm –depth 9999 update.
So we have to provide the depth that we want to update. In my case, the 9999 depth took too long and I cancelled it. But a --depth 5 was enough.
npm update --depth 5
If that does still not update the dependency then you have to manually change the package-lock.json.
Open the package-lock.json and find all occurrences of "minimist": { and remove the object.
Example:
Change this:
"dependencies": {
"minimist": {
"version": "1.2.0",
"bundled": true,
"dev": true,
"optional": true
}
}
to that:
"dependencies": {
}
And run npm install again.