javascript - 安装 react-addons-transition-group 时遇到问题

标签 javascript node.js npm reactjs

我在使用 npm 安装“react-addons-transition-group”时遇到问题。根据 react 网站:

The addons have moved to separate packages as well: 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, and react-addons-update, plus ReactDOM.unstable_batchedUpdates in react-dom. - 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,node是0.12.7

知道是什么原因造成的吗?

最佳答案

此错误已在 npm@2.13.1 中修复。基本上,semver@4.3.5 修复了一个错误,其中预发布将满足 * semver 范围。当 npm@2.11.1 发布此更新时,像 react-addons-transition-group 这样出于某种原因只有预发布的包将不再可用由 npm 安装,除非您明确告诉 npm 要安装的版本。

问题跟踪票是 npm/npm#8855 .更新 npm 的指南可用 here .

关于javascript - 安装 react-addons-transition-group 时遇到问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32547711/

相关文章:

javascript - 工具提示上的饼图悬停在多条形图 nvd3 上

linux - 如何安装 Cassandra nodejs

javascript - 如果超过某个限制时间,如何在 Node.js 中完成一项操作?

javascript - NPM 安装出现 fatal error : reference is not a tree

reactjs - 为什么 npm start (在 create-react-app 之后)无法运行?

javascript - react native : Can't style the Button

javascript - 如何使用字符串键在 Ember 模板中查找关联数组/对象值

javascript - 如何为我的 @types/definition 使用版本文件夹

javascript - colorbox 在不关闭弹出窗口的情况下刷新父窗口

javascript - 我在express js中丢失了我的URL