Error: npm WARN deprecated minimatch@2.0.10: Pleas

2019-04-05 23:16发布

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

6条回答
时光不老,我们不散
2楼-- · 2019-04-05 23:20

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

查看更多
可以哭但决不认输i
3楼-- · 2019-04-05 23:22

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楼-- · 2019-04-05 23:24

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.

查看更多
放荡不羁爱自由
5楼-- · 2019-04-05 23:32

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
查看更多
一夜七次
6楼-- · 2019-04-05 23:37

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

查看更多
倾城 Initia
7楼-- · 2019-04-05 23:44

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
查看更多
登录 后发表回答