npm peerDependency - 无法安装包 [英] npm peerDependency - can't install package
问题描述
我是 npm 世界的新手,所以也许这很容易.问题如下:
我有一个安装了 react v.15.2.0
的项目,我需要安装一个包,例如react 打字员
-
谢谢.
版本消息与您的想法相反.它说您拥有的 react 版本是 15.2.1,这与 react-typist
需要的不匹配".
确实,如果您查看 react 打字员 package.json
你会看到他们需要 React 的 0.14
版本.那就是问题所在.看起来 repo 已经快一年没有动过了,所以你可能想要选择其他东西,或者 fork 并进行一些更改.
I'm new to npm world, so maybe it's easy. The problem is the following:
I have a project with installed react v.15.2.0
, and I need to install a package, e.g. react typist
- https://github.com/jstejada/react-typist.
When I do it, I gen an error: (npm v2.*)
npm ERR! peerinvalid The package react@15.2.1 does not satisfy its siblings' peerDependencies requirements!
Reading on the internet, I followed an advice to update npm itself to v.3, so I did it by running npm install -g npm
. But the error is still there:
+-- UNMET PEER DEPENDENCY react@15.2.1
I assume, that I need to update react to v.15.2.1
, but don't know how to do it. Running npm update
doesn't help, still same error. Could you please advice, how to solve the issue?
Thanks.
The version message is the other way around to what you're thinking. It's saying "the version of react that you have is 15.2.1 and that doesn't match what react-typist
needs".
Indeed if you look in the react typist package.json
you'll see that they require version 0.14
of React. That's the problem. Looks like the repo hasn't been touched for almost a year, so you might want to pick something else, or fork it and make some changes.
这篇关于npm peerDependency - 无法安装包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!