Error: npm WARN deprecated minimatch@2.0.10: Pleas

2019-04-05 22:59发布

问题:

I have this problem during installation of ionic cordova:

npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue

Please anyone helpme

回答1:

You need to update your minimatch version Follow these steps:

Run this command to update minimatch

$ npm update minimatch

Run this command to check minimatch version

$ npm -v minimatch

If the version is still old one Run this command

$ npm install -g npm@3

Check your version again

$ npm -v minimatch


回答2:

Here, I worked in redux-Saga and try to install npm in my directory. At that time I found this error. I have solved this error by below command,

Run this command in cmd:

   npm install browserify babelify babel-preset-env


回答3:

I fixed this error by deinstalling nodejs v4.x (64-bit) and installing the latest nodejs v6.3.0 (32-bit). after that i installed cordova with 'npm install -g cordova' I use a windows machine. I hope this helps anyone :-)

Before that i deleted all my node_modules npm and npm-cache folders in my home directory and appdata -> roaming directory



回答4:

if your node js running in v 4.xx,

  1. remove first your npm and npm cache on your appData/roaming ...
  2. Uninstalling your node js
  3. Upgrade your Node js to v6.x (or latest version)

Hope this helps :D



回答5:

I was able to fix the error by re-installing node as suggested by Erdendi Lesmana. So now minimatch version is updated

$ npm -v minimatch
3.10.8

but I still cannot install cordova

sudo npm install -g cordova
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue

can someone help please.



回答6:

this is an npm error related to versioning. upgrade your minimatch to the latest version and the error will likely go away.