npm声明缺少的模块没有

下面是我的package.json文件.

{
  "name": "test",
  "version": "1.0.0",
  "description": "web_app",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "Brad",
  "license": "ISC",
  "devDependencies": {
    "babel-preset-es2015": "^6.9.0",
    "browser-sync": "^2.13.0",
    "del": "^2.2.0",
    "gulp": "^3.9.1",
    "gulp-autoprefixer": "^3.1.0",
    "gulp-babel": "^6.1.2",
    "gulp-changed": "^1.3.0",
    "gulp-cssnano": "^2.1.2",
    "gulp-file-include": "^0.13.7",
    "gulp-htmlmin": "^2.0.0",
    "gulp-if": "^2.0.1",
    "gulp-sass": "^2.3.2",
    "gulp-size": "^2.1.0",
    "gulp-sourcemaps": "^1.6.0",
    "gulp-uglify": "^1.5.3",
    "gulp-uncss": "^1.0.5",
    "gulp-useref": "^3.1.0",
    "htmlmin": "0.0.6",
    "run-sequence": "^1.2.1"
  },
  "dependencies": {
    "rxjs-es": "^5.0.0-beta.9"
  }
}

在运行’npm install’时,我收到以下错误:

npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated graceful-fs@3.0.8: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated lodash@1.0.2: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.
npm WARN deprecated graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch@1.0.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN prefer global node-gyp@3.3.1 should be installed with -g

由于我的package.json文件中没有像’minimatch’这样的模块,我假设其他模块依赖于它.所以我在全球范围内安装了所有过时的模块.这没有删除错误消息.如果我尝试运行说一个gulp任务它会工作,但是,如果我重新启动计算机,然后尝试运行相同的gulp任务,它会说模块丢失,即使它们在node_modules文件夹中.有任何想法吗?

最佳答案 是的,您的依赖项使用已弃用的包.

尝试运行npm ls以查找引用旧包的依赖项.

《npm声明缺少的模块没有》

点赞