为什么我收到此警告?

时间:2019-02-04 15:26:51

标签: angular npm

好吧,当我使用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'效果很好!但是我的怀疑是,有一些建议吗?

1 个答案:

答案 0 :(得分:1)

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

相关问题