我正在尝试安装babel和babel预设。但是我似乎遇到了严重的错误,使我无法安装。

我输入以下命令:

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

但它通过以下错误消息拒绝了我:
    └─┬ UNMET PEER DEPENDENCY [email protected]
  └─┬ [email protected]
    ├─┬ [email protected]
    │ └── [email protected]
    ├── [email protected]
    └─┬ [email protected]
      └── [email protected]

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

似乎是什么问题?

最佳答案

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

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

关于npm - UNMET PEER DEPENDENCY [email protected],我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/36215406/

10-16 21:21