首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法为下划线找到合适的版本

无法为下划线找到合适的版本
EN

Stack Overflow用户
提问于 2014-10-27 17:59:33
回答 1查看 1.2K关注 0票数 3

我得到以下错误:

代码语言:javascript
复制
Message:
    Unable to find suitable version for underscore
Details:
    code: ECONFLICT
    picks: [object Object],[object Object],[object Object]

使用下面的bower文件,这个错误我以前从未遇到过。我不能使用交互式shell,因为它会被部署到持续集成中。我们也更喜欢使用Github回购链接(不要问我为什么)的保龄球包。

代码语言:javascript
复制
{
    "name": "Nightbird",
    "version": "0.0.1",
    "main": "src/css/style.scss",
    "dependencies": {
      "backbone": "git@github.com:jashkenas/backbone.git#1.1.2",
      "underscore": "git@github.com:jashkenas/underscore.git#1.6.0",
      "aisis-bootstrap-theme": "git@github.com:AdamKyle/Aisis-Bootstrap-Theme.git#0.5.0",
      "selectize.js": "git@github.com:brianreavis/selectize.js.git#0.8",
      "underscore.string": "git@github.com:epeli/underscore.string.git#v2.3.2",
      "jquery-bootpag": "git@github.com:botmonster/jquery-bootpag.git#1.0.5",
      "underscore.inflection": "git@github.com:jeremyruppel/underscore.inflection.git",
      "moment": "git@github.com:moment/moment.git",
      "bootstrap-markdown": "git@github.com:toopay/bootstrap-markdown.git#2.5.0",
      "markdown-js": "git@github.com:evilstreak/markdown-js.git#v0.5.0",
      "to-markdown": "git@github.com:domchristie/to-markdown.git#v0.0.2",
      "font-awesome": "git@github.com:FortAwesome/Font-Awesome.git#4.2.0",
      "react-bower": "git@github.com:reactjs/react-bower.git#0.11.1",
      "showdown": "git@github.com:coreyti/showdown.git#0.3.1",
      "pure": "git@github.com:yahoo/pure.git#0.5.0"
    }
}

知道怎么回事吗?这是个虫子吗?还是只是个开发人员傻了?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-10-30 16:07:47

3种不同版本的下划线之间存在冲突。

这样做的原因是,下划线是您的3个依赖项所必需的:夜莺、主干和underscore.inflection。

使用Bower的最新版本,您可以看到以下信息:

代码语言:javascript
复制
Unable to find a suitable version for underscore, please choose one:
    1) underscore#1.6.0 which resolved to 1.6.0 and is required by Nightbird
    2) underscore#>=1.5.0 which resolved to 1.6.0 and is required by backbone#1.1.2
    3) underscore#~1.7.0 which resolved to 1.7.0 and is required by underscore.inflection#1.2.0

您可以通过在bower.json中添加以下内容来强制bower使用特定版本的解决方案。在本例中,它将强制使用1.6.0:

代码语言:javascript
复制
"resolutions": {
  "underscore": "1.6.0"
}
票数 4
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/26593863

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档