npm - 未满足对等依赖 babel-core@5.8.38

标签 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

似乎是什么问题?

最佳答案

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

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

关于npm - 未满足对等依赖 babel-core@5.8.38,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36215406/

相关文章:

javascript - 使用名称为 Array 的组件时出现奇怪的 React 错误

node.js - npm 错误 E401 : Unable to authenticate, 需要:基本领域 ="Sonatype Nexus Repository Manager"

node.js - npm 命令不工作/响应

angular - 安装 Ag Grid - Angular 2 后出错

javascript - 如何清理最不常用的 Node 包?

symfony - 在带有 encore 的 symfony 项目中,如何设置 Jest?

node.js - Npm 和 Node 命令被破坏

reactjs - 当名称不以大写字母开头时导入不起作用

node.js - npm/咕噜声 : is it possible to install grunt without npm?

javascript - 当有人安装我的 npm 模块时,如何告诉 npm 不要安装任何依赖项?