如何在npm中升级包

时间:2016-09-13 02:44:57

标签: maven npm opendaylight

我是maven / npm的新手,并使用maven来构建我的项目。执行mvn clean install -DskipTests时出错:

[INFO] Unpacking /usr/local/mavenRepository_be/org/opendaylight/odlparent/odl-license/0.0.1-Beryllium/odl-license-0.0.1-Beryllium.jar to /home/chenxing05/beryllium/dlux/dlux-web/target/classes with includes "" and excludes "META-INF/**"
[INFO]
[INFO] --- frontend-maven-plugin:0.0.24:install-node-and-npm (npm) @ dlux-web ---
[INFO] Node v0.12.7 is already installed.
[INFO] Found NPM version 3.1.3
[INFO]
[INFO] --- frontend-maven-plugin:0.0.24:npm (npm) @ dlux-web ---
[INFO] Running 'npm install --color=false' in /home/chenxing05/beryllium/dlux/dlux-web
[ERROR] npm WARN deprecated minimatch@0.4.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
[INFO] underscore@1.4.4 node_modules/jshint/node_modules/underscore -> node_modules/grunt-contrib-jshint/node_modules/underscore
[INFO] minimatch@0.4.0 node_modules/jshint/node_modules/minimatch -> node_modules/grunt-contrib-jshint/node_modules/minimatch
[INFO] - console-browserify@0.1.6 node_modules/console-browserify
...
[INFO] `-- peakle@0.0.1  extraneous
[INFO]
[ERROR] npm ERR! Linux 3.2.60
[ERROR] npm ERR! argv "/home/chenxing05/beryllium/dlux/dlux-web/node/node" "/home/chenxing05/beryllium/dlux/dlux-web/node/npm/bin/npm-cli.js" "install" "--color=false"
[ERROR] npm ERR! node v0.12.7
[ERROR] npm ERR! npm  v3.1.3
[ERROR] npm ERR! path /home/chenxing05/beryllium/dlux/dlux-web/node_modules/jshint/node_modules/underscore
[ERROR] npm ERR! code ENOENT
[ERROR] npm ERR! errno -2
[ERROR]
[ERROR] npm ERR! enoent ENOENT, rename '/home/chenxing05/beryllium/dlux/dlux-web/node_modules/jshint/node_modules/underscore'
[ERROR] npm ERR! enoent This is most likely not a problem with npm itself
[ERROR] npm ERR! enoent and is related to npm not being able to find a file.
[ERROR] npm ERR! enoent
[ERROR]
[ERROR] npm ERR! Please include the following file with any support request:
[ERROR] npm ERR!     /home/chenxing05/beryllium/dlux/dlux-web/npm-debug.log
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:08.442s
[INFO] Finished at: Tue Sep 13 10:40:59 CST 2016
[INFO] Final Memory: 30M/981M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:0.0.24:npm (npm) on project dlux-web: Failed to run task: 'npm install --color=false' failed. (error code 254) -> [Help 1]
[ERROR]
...

如图[ERROR] npm WARN deprecated minimatch@0.4.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue所示,如何更新minimatch,看起来npm update minimatch不起作用,有关此问题的任何建议吗?感谢〜

这是我的package.json:

{
  "author": "Mathieu Lemay",
  "name": "opendaylight-dlux",
  "description": "openDayLight User eXperience",
  "version": "0.2.0",
  "homepage": "http://opendaylight.org",
  "license": "EPL-1.0",
  "bugs": "https://bugs.opendaylight.org/",
  "repository": {
    "type": "git",
    "url": "https://git.opendaylight.org/gerrit/dlux.git"
  },
  "dependencies": {},
  "devDependencies": {
    "bower": "~1.3.12",
    "karma":"~0.12.0",
    "grunt": "~0.4.5",
    "grunt-cli": "~0.1.13",
    "grunt-contrib-copy": "~0.4.1",
    "grunt-contrib-concat": "~0.3.0",
    "grunt-contrib-coffee": "~0.7.0",
    "grunt-contrib-uglify": "~0.2.0",
    "grunt-contrib-compass": "~0.3.0",
    "grunt-contrib-jshint": "~0.4.0",
    "grunt-contrib-cssmin": "~0.6.0",
    "grunt-contrib-connect": "~0.3.0",
    "grunt-contrib-clean": "~0.4.1",
    "grunt-contrib-htmlmin": "~0.1.3",
    "grunt-contrib-imagemin": "~0.1.4",
    "grunt-contrib-watch": "~0.6.1",
    "grunt-usemin": "~0.1.11",
    "grunt-svgmin": "~0.2.0",
    "grunt-rev": "~0.1.0",
    "grunt-karma": "~0.8.0",
    "grunt-open": "~0.2.0",
    "grunt-concurrent": "~0.3.0",
    "matchdep": "~0.1.2",
    "connect-livereload": "~0.2.0",
    "grunt-google-cdn": "~0.2.0",
    "connect-modrewrite": "~0.5.4",
    "grunt-recess": "~0.5.0",
    "grunt-contrib-less": "~0.8.2",
    "grunt-conventional-changelog": "~1.0.0",
    "grunt-bump": "0.0.13",
    "grunt-html2js": "~0.2.4",
    "grunt-coffeelint": "0.0.8",
    "requirejs": "~2.1.19",
    "karma-requirejs": "~0.2.2",
    "grunt-shell": "~0.7.0",
    "grunt-ng-annotate": "~0.3.2",
    "grunt-replace": "~0.7.8",
    "karma-chrome-launcher": "~0.1.4",
    "karma-firefox-launcher": "~0.1.3",
    "karma-jasmine": "~0.1.5",
    "karma-coffee-preprocessor": "~0.2.1",
    "karma-coverage": "~0.2.6",
    "karma-phantomjs-launcher": "~0.1.4",
    "angular-mocks": "~1.2.22",
    "jasmine": "~2.0.1"
  },
  "engines": {
    "node": ">=0.8.0"
  },
  "scripts": {
    "test": "grunt test"
  }
}

1 个答案:

答案 0 :(得分:0)

我认为您需要为您的平台安装npmgrunt-cli。完成后,更改package.json中的版本