错误通过NPM安装的第三方软件包angular4
问题描述:
npm install --save angular2-datatable
和
sudo npm i --save lodash
,但这个错误安装angular2-datatable
和loadash
[email protected] /Users/.../Desktop/reporter-ui
├── UNMET PEER DEPENDENCY @angular/[email protected]
├── UNMET PEER DEPENDENCY @angular/[email protected]
├── UNMET PEER DEPENDENCY @angular/[email protected]
└── [email protected]
npm WARN [email protected] requires a peer of @angular/[email protected]^2.0.0 but none was installed.
npm WARN [email protected] requires a peer of @angular/[email protected]^2.0.0 but none was installed.
npm WARN [email protected] requires a peer of @angular/[email protected]^2.0.0 but none was installed.
出现了两次。我如何更新这些依赖关系?如果我做一个ng --version
angular-cli: 1.0.0-beta.28.3
node: 7.10.0
os: darwin x64
@angular/animations: 4.2.3
@angular/common: 4.2.3
@angular/compiler: 4.2.3
@angular/core: 4.2.3
@angular/forms: 4.2.3
@angular/http: 4.2.3
@angular/material: 2.0.0-beta.6
@angular/platform-browser: 4.2.3
@angular/platform-browser-dynamic: 4.2.3
@angular/router: 4.2.3
@angular/cli: 1.1.0
@angular/compiler-cli: 4.2.3
@angular/language-service: 4.2.3
,我曾尝试手动更改版本为正确的人在我package.json
但我仍然得到错误。在我看来,安装了正确的版本,但我该如何告诉角度cli和or npm?另外,我试过升级npm和角度cli仍然是一样的错误。
答
经过进一步调查,正在生成的错误与声明的警告无关。正如评论所述,这些警告可以忽略,一切都按预期工作。
那些看起来更像是可以忽略的警告。您的代码是否在后续运行?如果是,那么继续。 –
我在我的反应版本中有这样的错误。他们不会干涉我的构建,而且现在似乎无关紧要。 – Ozan
您需要忽略这些警告。这不会影响你的编码。所以,更进一步。 –