0

我正在尝试安装一些节点包并在控制台上出现以下错误。

这是 package.json 文件的外观:

{
  "name": "reactApp",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "dev": "./node_modules/.bin/webpack-dev-server",
    "build": "./node_modules/.bin/webpack"
  },
  "author": "",

  "dependencies": {
    "bootstrap": "^3.3.6",
    "classnames": "^2.2.1",
    "flux": "^2.1.1",
    "history": "~1.13.x",
    "jquery": "^2.1.4",
    "react": "^0.14.3",
    "react-dom": "^0.14.3",
    "react-router": "^1.0.2",
    "react-tap-event-plugin": "^0.2.1",
    "underscore": "^1.8.3",
    "webpack-isomorphic-tools": "^2.2.22"
  },
  "devDependencies": {
    "autoprefixer-loader": "^3.1.0",
    "babel-core": "^6.3.17",
    "babel-loader": "^6.2.0",
    "babel-preset-es2015": "^6.3.13",
    "babel-preset-react": "^6.3.13",
    "babel-preset-stage-0": "^6.3.13",
    "css-loader": "^0.23.0",
    "extract-text-webpack-plugin": "^0.9.1",
    "file-loader": "^0.8.5",
    "style-loader": "^0.13.0",
    "stylus-loader": "^1.4.2",
    "url-loader": "^0.5.7",
    "webpack": "^1.12.9",
    "webpack-dev-server": "^1.14.0"
  }
}

我收到以下错误:

npm WARN package.json reactApp@1.0.0 No repository field.
npm WARN unmet dependency C:\projects\reactApp\node_modules\webpack-isomorphic-tools requires babel-runtime@'^5.6.20' but will load
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-runtime,
npm WARN unmet dependency which is version 6.3.19
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-core requires babel-runtime@'^5.0.0' but will load
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-runtime,
npm WARN unmet dependency which is version 6.3.19
npm WARN unmet dependency C:\projects\reactApp\node_modules\webpack-isomorphic-tools\node_modules\require-hacker requires babel-runtime@'^5.6.20' but will load
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-runtime,
npm WARN unmet dependency which is version 6.3.19
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-core\node_modules\babel-code-frame requires babel-runtime@'^5.0.0' but will load
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-runtime,
npm WARN unmet dependency which is version 6.3.19
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-core\node_modules\babel-generator requires babel-runtime@'^5.0.0' but will load
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-runtime,
npm WARN unmet dependency which is version 6.3.19
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-core\node_modules\babel-generator requires lodash@'^3.10.1' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-core\node_modules\babel-helpers requires babel-runtime@'^5.0.0' but will load
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-runtime,
npm WARN unmet dependency which is version 6.3.19
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-core\node_modules\babel-messages requires babel-runtime@'^5.0.0' but will load
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-runtime,
npm WARN unmet dependency which is version 6.3.19
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-core\node_modules\babel-template requires babel-runtime@'^5.0.0' but will load
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-runtime,
npm WARN unmet dependency which is version 6.3.19
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-core\node_modules\babel-template requires lodash@'^3.10.1' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-core\node_modules\babel-register requires lodash@'^3.10.0' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-core\node_modules\babel-register requires babel-runtime@'^5.0.0' but will load
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-runtime,
npm WARN unmet dependency which is version 6.3.19
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-core\node_modules\babel-traverse requires babel-runtime@'^5.0.0' but will load
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-runtime,
npm WARN unmet dependency which is version 6.3.19
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-core\node_modules\babel-traverse requires lodash@'^3.10.1' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-core\node_modules\babel-types requires babel-runtime@'^5.0.0' but will load
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-runtime,
npm WARN unmet dependency which is version 6.3.19
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-core\node_modules\babel-types requires lodash@'^3.10.1' but will load
npm WARN unmet dependency undefined,

npm WARN unmet dependency which is version 6.3.19
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-preset-es2015\node_modules\babel-plugin-transform-es2015-template-literals requires babel-runtime@'^5.0.0' but will load
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-runtime,
npm WARN unmet dependency which is version 6.3.19
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-preset-es2015\node_modules\babel-plugin-transform-es2015-literals requires babel-runtime@'^5.0.0' but will load
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-runtime,
npm WARN unmet dependency which is version 6.3.19
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-preset-es2015\node_modules\babel-plugin-transform-es2015-function-name requires babel-runtime@'^5.0.0' but will load
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-runtime,
npm WARN unmet dependency which is version 6.3.19
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-preset-es2015\node_modules\babel-plugin-transform-es2015-arrow-functions requires babel-runtime@'^5.0.0' but will load
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-runtime,
npm WARN unmet dependency which is version 6.3.19
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-preset-es2015\node_modules\babel-plugin-transform-es2015-block-scoped-functions requires babel-runtime@'^5.0.0' but will load
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-runtime,
npm WARN unmet dependency which is version 6.3.19
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-preset-es2015\node_modules\babel-plugin-transform-es2015-classes requires babel-runtime@'^5.0.0' but will load
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-runtime,
npm WARN unmet dependency which is version 6.3.19
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-preset-es2015\node_modules\babel-plugin-transform-es2015-shorthand-properties requires babel-runtime@'^5.0.0' but will load
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-runtime,
npm WARN unmet dependency which is version 6.3.19
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-preset-es2015\node_modules\babel-plugin-transform-es2015-computed-properties requires babel-runtime@'^5.0.0' but will load
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-runtime,
npm WARN unmet dependency which is version 6.3.19
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-preset-es2015\node_modules\babel-plugin-transform-es2015-for-of requires babel-runtime@'^5.0.0' but will load
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-runtime,
npm WARN unmet dependency which is version 6.3.19
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-preset-es2015\node_modules\babel-plugin-transform-es2015-sticky-regex requires babel-runtime@'^5.0.0' but will load
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-runtime,
npm WARN unmet dependency which is version 6.3.19
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-preset-es2015\node_modules\babel-plugin-transform-es2015-unicode-regex requires babel-runtime@'^5.0.0' but will load
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-runtime,
npm WARN unmet dependency which is version 6.3.19
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-preset-es2015\node_modules\babel-plugin-check-es2015-constants requires babel-runtime@'^5.0.0' but will load
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-runtime,
npm WARN unmet dependency which is version 6.3.19
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-preset-es2015\node_modules\babel-plugin-transform-es2015-spread requires babel-runtime@'^5.0.0' but will load
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-runtime,
npm WARN unmet dependency which is version 6.3.19
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-preset-es2015\node_modules\babel-plugin-transform-es2015-parameters requires babel-runtime@'^5.0.0' but will load
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-runtime,
npm WARN unmet dependency which is version 6.3.19
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-preset-es2015\node_modules\babel-plugin-transform-es2015-destructuring requires babel-runtime@'^5.0.0' but will load
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-runtime,
npm WARN unmet dependency which is version 6.3.19
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-preset-es2015\node_modules\babel-plugin-transform-es2015-typeof-symbol requires babel-runtime@'^5.0.0' but will load
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-runtime,
npm WARN unmet dependency which is version 6.3.19
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-preset-es2015\node_modules\babel-plugin-transform-es2015-modules-commonjs requires babel-runtime@'^5.0.0' but will load
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-runtime,
npm WARN unmet dependency which is version 6.3.19
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-preset-es2015\node_modules\babel-plugin-transform-regenerator requires babel-runtime@'^5.0.0' but will load
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-runtime,
npm WARN unmet dependency which is version 6.3.19
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-preset-es2015\node_modules\babel-plugin-transform-es2015-function-name\node_modules\babel-helper-function-name requires babel-runtime@'^5.0.0' but will load
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-runtime,
npm WARN unmet dependency which is version 6.3.19
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-preset-es2015\node_modules\babel-plugin-transform-es2015-function-name\node_modules\babel-types requires babel-runtime@'^5.0.0' but will load
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-runtime,
npm WARN unmet dependency which is version 6.3.19
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-preset-es2015\node_modules\babel-plugin-transform-es2015-function-name\node_modules\babel-helper-function-name\node_modules\babel-traverse requires babel-runtime@'^5.0.0' but will load
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-runtime,
npm WARN unmet dependency which is version 6.3.19
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-preset-es2015\node_modules\babel-plugin-transform-es2015-function-name\node_modules\babel-helper-function-name\node_modules\babel-helper-get-function-arity requires babel-runtime@'^5.0.0' but will load
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-runtime,
npm WARN unmet dependency which is version 6.3.19
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-preset-stage-0\node_modules\babel-preset-stage-1\node_modules\babel-preset-stage-2\node_modules\babel-preset-stage-3\node_modules\babel-plugin-transform-async-to-generator\node_modules\babel-helper-remap-async-to-generator\node_modules\babel-template requires babel-runtime@'^5.0.0' but will load
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-runtime,
npm WARN unmet dependency which is version 6.3.19
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-preset-stage-0\node_modules\babel-preset-stage-1\node_modules\babel-preset-stage-2\node_modules\babel-preset-stage-3\node_modules\babel-plugin-transform-async-to-generator\node_modules\babel-helper-remap-async-to-generator\node_modules\babel-types requires babel-runtime@'^5.0.0' but will load
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-runtime,
npm WARN unmet dependency which is version 6.3.19
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-preset-stage-0\node_modules\babel-preset-stage-1\node_modules\babel-preset-stage-2\node_modules\babel-preset-stage-3\node_modules\babel-plugin-transform-async-to-generator\node_modules\babel-helper-remap-async-to-generator\node_modules\babel-traverse requires babel-runtime@'^5.0.0' but will load
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-runtime,
npm WARN unmet dependency which is version 6.3.19
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-preset-stage-0\node_modules\babel-preset-stage-1\node_modules\babel-preset-stage-2\node_modules\babel-preset-stage-3\node_modules\babel-plugin-transform-async-to-generator\node_modules\babel-helper-remap-async-to-generator\node_modules\babel-helper-function-name requires babel-runtime@'^5.0.0' but will load
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-runtime,
npm WARN unmet dependency which is version 6.3.19
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-preset-stage-0\node_modules\babel-preset-stage-1\node_modules\babel-preset-stage-2\node_modules\babel-preset-stage-3\node_modules\babel-plugin-transform-async-to-generator\node_modules\babel-helper-remap-async-to-generator\node_modules\babel-template\node_modules\babylon requires babel-runtime@'^5.0.0' but will load
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-runtime,
npm WARN unmet dependency which is version 6.3.19
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-preset-stage-0\node_modules\babel-preset-stage-1\node_modules\babel-preset-stage-2\node_modules\babel-preset-stage-3\node_modules\babel-plugin-transform-async-to-generator\node_modules\babel-helper-remap-async-to-generator\node_modules\babel-traverse\node_modules\babel-code-frame requires babel-runtime@'^5.0.0' but will load
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-runtime,
npm WARN unmet dependency which is version 6.3.19
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-preset-stage-0\node_modules\babel-preset-stage-1\node_modules\babel-preset-stage-2\node_modules\babel-preset-stage-3\node_modules\babel-plugin-transform-async-to-generator\node_modules\babel-helper-remap-async-to-generator\node_modules\babel-traverse\node_modules\babel-messages requires babel-runtime@'^5.0.0' but will load
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-runtime,
npm WARN unmet dependency which is version 6.3.19
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-preset-stage-0\node_modules\babel-preset-stage-1\node_modules\babel-preset-stage-2\node_modules\babel-preset-stage-3\node_modules\babel-plugin-transform-async-to-generator\node_modules\babel-helper-remap-async-to-generator\node_modules\babel-traverse\node_modules\babylon requires babel-runtime@'^5.0.0' but will load
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-runtime,
npm WARN unmet dependency which is version 6.3.19
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-preset-stage-0\node_modules\babel-preset-stage-1\node_modules\babel-preset-stage-2\node_modules\babel-preset-stage-3\node_modules\babel-plugin-transform-async-to-generator\node_modules\babel-helper-remap-async-to-generator\node_modules\babel-helper-function-name\node_modules\babel-helper-get-function-arity requires babel-runtime@'^5.0.0' but will load
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-runtime,
npm WARN unmet dependency which is version 6.3.19
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-preset-stage-0\node_modules\babel-preset-stage-1\node_modules\babel-preset-stage-2\node_modules\babel-preset-stage-3\node_modules\babel-plugin-transform-exponentiation-operator\node_modules\babel-plugin-syntax-exponentiation-operator requires babel-runtime@'^5.0.0' but will load
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-runtime,
npm WARN unmet dependency which is version 6.3.19
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-preset-stage-0\node_modules\babel-preset-stage-1\node_modules\babel-preset-stage-2\node_modules\babel-preset-stage-3\node_modules\babel-plugin-transform-exponentiation-operator\node_modules\babel-helper-builder-binary-assignment-operator-visitor requires babel-runtime@'^5.0.0' but will load
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-runtime,
npm WARN unmet dependency which is version 6.3.19
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-preset-stage-0\node_modules\babel-preset-stage-1\node_modules\babel-preset-stage-2\node_modules\babel-preset-stage-3\node_modules\babel-plugin-transform-exponentiation-operator\node_modules\babel-helper-builder-binary-assignment-operator-visitor\node_modules\babel-helper-explode-assignable-expression requires babel-runtime@'^5.0.0' but will load
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-runtime,
npm WARN unmet dependency which is version 6.3.19
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-preset-stage-0\node_modules\babel-preset-stage-1\node_modules\babel-preset-stage-2\node_modules\babel-preset-stage-3\node_modules\babel-plugin-transform-exponentiation-operator\node_modules\babel-helper-builder-binary-assignment-operator-visitor\node_modules\babel-types requires babel-runtime@'^5.0.0' but will load
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-runtime,
npm WARN unmet dependency which is version 6.3.19
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-preset-stage-0\node_modules\babel-preset-stage-1\node_modules\babel-preset-stage-2\node_modules\babel-preset-stage-3\node_modules\babel-plugin-transform-exponentiation-operator\node_modules\babel-helper-builder-binary-assignment-operator-visitor\node_modules\babel-helper-explode-assignable-expression\node_modules\babel-traverse requires babel-runtime@'^5.0.0' but will load
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-runtime,
npm WARN unmet dependency which is version 6.3.19
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-preset-stage-0\node_modules\babel-preset-stage-1\node_modules\babel-preset-stage-2\node_modules\babel-preset-stage-3\node_modules\babel-plugin-transform-exponentiation-operator\node_modules\babel-helper-builder-binary-assignment-operator-visitor\node_modules\babel-helper-explode-assignable-expression\node_modules\babel-traverse\node_modules\babel-code-frame requires babel-runtime@'^5.0.0' but will load
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-runtime,
npm WARN unmet dependency which is version 6.3.19
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-preset-stage-0\node_modules\babel-preset-stage-1\node_modules\babel-preset-stage-2\node_modules\babel-preset-stage-3\node_modules\babel-plugin-transform-exponentiation-operator\node_modules\babel-helper-builder-binary-assignment-operator-visitor\node_modules\babel-helper-explode-assignable-expression\node_modules\babel-traverse\node_modules\babel-messages requires babel-runtime@'^5.0.0' but will load
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-runtime,
npm WARN unmet dependency which is version 6.3.19
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-preset-stage-0\node_modules\babel-preset-stage-1\node_modules\babel-preset-stage-2\node_modules\babel-preset-stage-3\node_modules\babel-plugin-transform-exponentiation-operator\node_modules\babel-helper-builder-binary-assignment-operator-visitor\node_modules\babel-helper-explode-assignable-expression\node_modules\babel-traverse\node_modules\babylon requires babel-runtime@'^5.0.0' but will load
npm WARN unmet dependency C:\projects\reactApp\node_modules\babel-runtime,
npm WARN unmet dependency which is version 6.3.19
npm ERR! peerinvalid The package history does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer react-router@1.0.3 wants history@^1.17.0

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! cwd C:\projects\reactApp
npm ERR! node -v v5.3.0
npm ERR! npm -v 1.4.28
npm ERR! code EPEERINVALID
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\projects\reactApp\npm-debug.log
npm ERR! not ok code 0
4

1 回答 1

1

看起来你需要history@^1.17.0,但你一直在安装history@~1.13.x. 只需将其替换为 (in package.json)

"history": "^1.17.0"
于 2016-01-12T17:15:34.103 回答