我在使用npm安装“react-addons-transition-group”时遇到问题。根据反应网站:
插件也移动到单独的包中:react-addons-clone-with-props,react-addons-create-fragment,react-addons-css-transition-group,react-addons-linked-state-mixin ,react-addons-pure-render-mixin,react-addons-shallow-compare,react-addons-transition-group,react-addons-update,以及react-dom中的ReactDOM.unstable_batchedUpdates。 - https://facebook.github.io/react/blog/2015/07/03/react-v0.14-beta-1.html
我试过了:
npm install react-addons-transition-group
npm install react-addons-css-transition-group
但我得到了:
npm ERR! notarget No compatible version found: react-addons-transition-group@'*'
npm ERR! notarget Valid install targets:
npm ERR! notarget ["0.14.0-beta1","0.14.0-beta2","0.14.0-beta3","0.14.0-rc1"]
npm ERR! notarget
npm ERR! notarget This is most likely not a problem with npm itself.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
我正在使用:
"react": "^0.14.0-rc1",
"react-dom": "0.14.0-rc1"
所以我不确定为什么会抛出这个错误。 0.14.0-rc1在兼容版本列表中。
我的npm版本是2.11.3,节点是0.12.7
知道可能导致这种情况的原因吗?
答案 0 :(得分:6)
此错误已在npm@2.13.1
中修复。基本上,semver@4.3.5
修复了一个错误,其中预发布将满足*
semver范围。当npm@2.11.1
推出此更新时,除非您明确告知react-addons-transition-group
,否则npm
无法再安装npm
等仅因某些原因而预发布的软件包要安装的版本。
问题跟踪器票证为npm/npm#8855。我们提供了npm
更新指南{/ 3}}。