Open MixMasterT opened 4 years ago
Yup, same problem
Same issue is also present for @vue/cli-plugin-babel
and @vue/cli-plugin-eslint
Same issue present for the following;
Same issue.
But the depended version is a caret range: "minimist": "^1.2.0"
. You should be able to fix it by cleaning up the cache, the lockfiles and then reinstalling.
Can someone provide the exact steps on how to do this the right way?
Running npm audit
, I can see that the problem is with the version of minimist that mkdirp uses. mkdirp is a sub dependency in all of the mentioned packages above.
@vue/cli-plugin-eslint
:
@vue/cli-plugin-unit-mocha
, @vue/cli-plugin-e2e-cypress
, chromedriver
:
I don't see how @vue/cli-service
is affected.
The mocha and cypress ones are addressed in https://github.com/mochajs/mocha/pull/4204 https://github.com/cypress-io/cypress/pull/6726 But we can't upgrade now because they are only available in new major versions.
So please use the resolutions
field in package.json
for now.
The above workaround did work for me like so:
package.json:
"scripts": {
"preinstall": "npx npm-force-resolutions",
......
}
"resolutions": {
"minimist": "1.2.3",
"mkdir": "0.5.3"
}
I then ran npm install
.
I am no expert. If anyone has a better solution or any comments, let me know.
Version
4.2.3
Reproduction link
n/a
Environment info
Steps to reproduce
This issue can be easily found using npm tooling. I am not sure how to identify it using yarn. Basically, just run "npm audit" or "npm audit --fix". The minimist package is recognized to have a prototype pollution vulnerability and it is recommended to move up to version 1.2.3 or higher.
What is expected?
No security vulnerabilities
What is actually happening?
npm flags vue-cli as harboring a moderate risk (prototype pollution) through the "minimist" dependency.
I tried to fix this myself, but was unable to push my code up for a PR. It should be as simple as updating the line in package.json. However tests will need to be run to ensure that doing so does not introduce any other problems.