【发布时间】: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' 非常好用!但我的疑问是,有什么建议吗?
【问题讨论】:
-
Momentjs 效果很好,在您发布的输出中没有报告任何问题。但是警告实际上是关于角度数据表的依赖关系可能不会。