奇怪的错误'npm WARN express-validation@1.0.2需要joi @ *的同行但是没有安装......?

时间:2017-10-27 01:56:53

标签: node.js express npm

'npm WARN express-validation@1.0.2 requires a peer of joi@* but none is installed. You must install peer dependencies yourself.'是什么意思?我该如何解决?

我跑的时候:

npm install express-validation --save 

我明白了:

npm WARN express-validation@1.0.2 requires a peer of joi@* but none is installed. You must install peer dependencies yourself.

然后我跑:

npm install -g npm-install-peers

然后:

npm-install-peers

然后我得到:

This package doesn't seem to have any peerDependencies

然后我跑:

npm install express-validation --save 

我明白了:

npm WARN express-validation@1.0.2 requires a peer of joi@* but none is installed. You must install peer dependencies yourself.

2 个答案:

答案 0 :(得分:0)

您可以使用npm install joi --save

自行安装

答案 1 :(得分:0)

程序包名称错误。如果您要验证应用程序中的数据,则应考虑开始寻找express-validator。

快速验证需要喜悦,我不知道两者的含义。