UNMET PEER DEPENDENCY eslint@2.7.0

时间:2016-04-14 13:41:00

标签: javascript node.js amazon-web-services npm eslint

我今天整天都在头疼,基本上部署到aws会导致以下错误:

npm ERR! code EPEERINVALID
npm ERR! peerinvalid The package eslint@2.7.0 does not satisfy its siblings' peerDependencies requirements!

我认为这是由npm错误造成的,在安装了我的所有软件包之后我在控制台中得到了这个(注意这只是与我认为导致错误相关的输出的一点点和平,主要是第一行UNMET PEER DEPENDENCY eslint@2.7.0) :

├─┬ UNMET PEER DEPENDENCY eslint@2.7.0
│ ├─┬ chalk@1.1.3 
│ │ ├── ansi-styles@2.2.1 
│ │ ├── has-ansi@2.0.0 
│ │ └── supports-color@2.0.0 
│ ├─┬ concat-stream@1.5.1 
│ │ ├── inherits@2.0.1 
│ │ ├─┬ readable-stream@2.0.6 
│ │ │ ├── isarray@1.0.0 
│ │ │ ├── process-nextick-args@1.0.6 
│ │ │ └── util-deprecate@1.0.2 
│ │ └── typedarray@0.0.6 
│ ├─┬ doctrine@1.2.1 
│ │ ├── esutils@1.1.6 
│ │ └── isarray@1.0.0 
│ ├─┬ es6-map@0.1.3 
│ │ ├── d@0.1.1 
│ │ ├── es5-ext@0.10.11 
│ │ ├── es6-iterator@2.0.0 
│ │ └── event-emitter@0.3.4 
│ ├─┬ escope@3.6.0 
│ │ ├── es6-weak-map@2.0.1 
│ │ └─┬ esrecurse@4.1.0 
│ │   └── estraverse@4.1.1 
│ ├─┬ espree@3.1.3 
│ │ ├── acorn@3.0.4 
│ │ └─┬ acorn-jsx@2.0.1 
│ │   └── acorn@2.7.0 
│ ├── estraverse@4.2.0 
│ ├── esutils@2.0.2 
│ ├─┬ file-entry-cache@1.2.4 
│ │ └─┬ flat-cache@1.0.10 
│ │   ├─┬ del@2.2.0 
│ │   │ ├─┬ globby@4.0.0 
│ │   │ │ └── glob@6.0.4 
│ │   │ ├── is-path-cwd@1.0.0 
│ │   │ ├─┬ is-path-in-cwd@1.0.0 
│ │   │ │ └── is-path-inside@1.0.0 
│ │   │ └── pify@2.3.0 
│ │   ├── read-json-sync@1.1.1 
│ │   └── write@0.2.1 
│ ├─┬ glob@7.0.3 
│ │ ├─┬ inflight@1.0.4 
│ │ │ └── wrappy@1.0.1 
│ │ └── once@1.3.3 
│ ├── globals@9.4.0 
│ ├── ignore@3.1.1 
│ ├── imurmurhash@0.1.4 
│ ├─┬ inquirer@0.12.0 
│ │ ├── ansi-escapes@1.3.0 
│ │ ├── ansi-regex@2.0.0 
│ │ ├─┬ cli-cursor@1.0.2 
│ │ │ └─┬ restore-cursor@1.0.1 
│ │ │   ├── exit-hook@1.1.1 
│ │ │   └── onetime@1.1.0 
│ │ ├── cli-width@2.1.0 
│ │ ├── figures@1.5.0 
│ │ ├─┬ readline2@1.0.1 
│ │ │ ├── code-point-at@1.0.0 
│ │ │ ├── is-fullwidth-code-point@1.0.0 
│ │ │ └── mute-stream@0.0.5 
│ │ ├── run-async@0.1.0 
│ │ ├── rx-lite@3.1.2 
│ │ ├── string-width@1.0.1 
│ │ └── through@2.3.8 
│ ├─┬ is-my-json-valid@2.13.1 
│ │ ├── generate-function@2.0.0 
│ │ ├─┬ generate-object-property@1.2.0 
│ │ │ └── is-property@1.0.2 
│ │ ├── jsonpointer@2.0.0 
│ │ └── xtend@4.0.1 
│ ├─┬ is-resolvable@1.0.0 
│ │ └── tryit@1.0.2 
│ ├─┬ js-yaml@3.5.5 
│ │ ├─┬ argparse@1.0.7 
│ │ │ └── sprintf-js@1.0.3 
│ │ └── esprima@2.7.2 
│ ├─┬ json-stable-stringify@1.0.1 
│ │ └── jsonify@0.0.0 
│ ├─┬ optionator@0.8.1 
│ │ ├── deep-is@0.1.3 
│ │ ├── fast-levenshtein@1.1.3 
│ │ ├── levn@0.3.0 
│ │ ├── prelude-ls@1.1.2 
│ │ ├── type-check@0.3.2 
│ │ └── wordwrap@1.0.0 
│ ├── path-is-inside@1.0.1 
│ ├── pluralize@1.2.1 
│ ├── progress@1.1.8 
│ ├─┬ require-uncached@1.0.2 
│ │ ├─┬ caller-path@0.1.0 
│ │ │ └── callsites@0.2.0 
│ │ └── resolve-from@1.0.1 
│ ├── shelljs@0.6.0 
│ ├── strip-json-comments@1.0.4 
│ ├─┬ table@3.7.8 
│ │ ├── bluebird@3.3.5 
│ │ ├── slice-ansi@0.0.4 
│ │ ├── tv4@1.2.7 
│ │ └── xregexp@3.1.0 
│ ├── text-table@0.2.0 
│ └─┬ user-home@2.0.0 
│   └── os-homedir@1.0.1 

当我第一次遇到这个错误时,我遇到了版本2.5.3的eslint,因为我已经更新到2.7.0,但我仍然看到了这个,我完全不知道是什么导致它。

以下列方式将eslint安装为devDependency:

"devDependencies": {
  "eslint": "^2.7.0",
  ...
}

1 个答案:

答案 0 :(得分:1)

在输出的某处,您应该有一行看起来像这样:

  

npm WARN EPEERINVALID karma-phantomjs-launcher@0.1.4需要一个karma @> = 0.9的同伴,但没有安装。

此示例适用于Karma,因为我无法使用ESLint重现您的错误,但该消息应该读取相同内容。

对于这个例子,我还需要:

npm install karma@">=0.9" --save-dev

以满足未满足的依赖性。

这可能用于NPM3中对等依赖项的弃用。回到NPM2,它会为你安装缺少的依赖项,但是在NPM3中它们只是警告你并让你自己处理它。

如果你最近搬到了更新版本的Node& NPM然后你已经从NPM2移动到NPM3,这将导致你开始看到这些消息。

编辑:

我认为如果您的依赖项中的某些其他程序包需要eslint的不同版本而不是2.7.0,您可能也会收到此消息。就像其他一些软件包想要eslint@^1.0.0 eslint@^2.7.0并不满足sap.ui.define( ["sap/ui/core/UIComponent"], function (UIComponent) { "use strict"; return UIComponent.extend("dividendgrowthtools.Component", { metadata: ... init : function () { UIComponent.prototype.init.apply(this, arguments); ... // set i18n model ... var i18nModel = new sap.ui.model.resource.ResourceModel({ bundleUrl: [rootPath, mConfig.resourceBundle].join("/"), bundleLocale: sCurrentLocale }); this.setModel(i18nModel, "i18n"); // redirect the "dividendgrowthtools" package to the local web app jQuery.sap.registerModulePath("dividendgrowthtools", "/"); } }); }, /* bExport= */ true); 但是如果没有所有依赖项的列表就很难说。

相关问题