UNMET PEER DEPENDENCY babel-core@5.8.38

时间:2016-03-25 06:54:41

标签: npm babeljs npm-install

我试图安装babel和babel预设。但我似乎遇到了一个阻止我安装的严重错误。

我输入以下命令:

npm install --save-dev babel-core babel-loader babel-preset-es2015 babel-preset-stage-0 babel-preset-react

但它拒绝了我,并出现以下错误消息:

    └─┬ UNMET PEER DEPENDENCY babel-core@5.8.38
  └─┬ regenerator@0.8.40
    ├─┬ defs@1.1.1
    │ └── esprima-fb@15001.1001.0-dev-harmony-fb 
    ├── esprima-fb@15001.1001.0-dev-harmony-fb 
    └─┬ recast@0.10.33
      └── esprima-fb@15001.1001.0-dev-harmony-fb 

npm WARN optional Skipping failed optional dependency /babel/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.9
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.9
npm WARN babel-loader@6.2.4 requires a peer of babel-core@^6.0.0 but none was installed.
npm WARN graphql_demo@1.0.0 No repository field.
npm WARN graphql_demo@1.0.0 No license field.
npm ERR! code 1

似乎是什么问题?

1 个答案:

答案 0 :(得分:1)

我还必须为jspm添加一个依赖项,以便正确安装babel-loader。

…
"dependencies": {
    "babel-loader": "^6.2.7",
    "jspm": "^0.16.48",
    …
}