【问题标题】:Why i'm getting this warnings?为什么我会收到此警告?
【发布时间】:2019-02-04 23:40:36
【问题描述】:

好吧,当我使用 npm 安装一些依赖项或一些库时,有时,在命令提示符中我会收到一些错误或警告,如下所示:

npm WARN angular-datatables@6.0.0 requires a peer of @angular/common@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN angular-datatables@6.0.0 requires a peer of @angular/compiler@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN angular-datatables@6.0.0 requires a peer of @angular/core@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN angular-datatables@6.0.0 requires a peer of @angular/platform-browser@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN angular-datatables@6.0.0 requires a peer of @angular/platform-browser-dynamic@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

+ moment@2.24.0
added 1 package from 6 contributors and audited 40197 packages in 12.862s
found 1 high severity vulnerability
  run `npm audit fix` to fix them, or `npm audit` for details

我使用了 npm install moment.js --save

库,在本例中:'moment.js' 非常好用!但我的疑问是,有什么建议吗?

【问题讨论】:

  • Npm peer dependency error的可能重复
  • Momentjs 效果很好,在您发布的输出中没有报告任何问题。但是警告实际上是关于角度数据表的依赖关系可能不会。

标签: angular npm


【解决方案1】:

NPM 会警告您,因为 angular-datatables 需要对等依赖项,模块需要运行的特定依赖项但这些只是警告,如果一切正常,您不需要自己安装这些对等依赖项。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-11-10
    • 1970-01-01
    • 2012-07-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多