首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Bower安装arcgis-js失败(找不到适合dojo的版本)

Bower安装arcgis-js失败(找不到适合dojo的版本)
EN

Stack Overflow用户
提问于 2017-05-23 03:38:33
回答 2查看 146关注 0票数 0

在尝试运行以下命令时,我会得到以下错误:bower install arcgis-js-api

我已经尝试安装到一个新的目录中,并且在创建了一个基本的bower.json文件之后。搜索网络已经发现了一些人与这个问题,但没有张贴的解决方案,如何解决。

代码语言:javascript
运行
复制
{  
    "name": "arcgis-js-api-sample-app",  
    "version": "1.0.0",  
    "license": "Apache-2.0",  
    "dependencies": {  
        "esri": "arcgis-js-api#3.15.0"  
    },  
    "resolutions": {  
        "dojo": "v1.10.4/esri-3.14.0"  
    }  
}  

错误消息: bower安装arcgis-js-api ECONFLICT无法找到适合dojo的版本

全程追踪:

代码语言:javascript
运行
复制
$ bower install arcgis-js-api
bower arcgis-js-api#*           cached https://github.com/Esri/arcgis-js-api.git#4.3.1
bower arcgis-js-api#*         validate 4.3.1 against https://github.com/Esri/arcgis-js-api.git#*
bower dojo#v1.12.1/esri-3.20.0  cached https://github.com/Esri/dojo.git#v1.12.1/esri-3.20.0
bower dojo#v1.12.1/esri-3.20.0         validate v1.12.1/esri-3.20.0 against https://github.com/Esri/dojo.git#v1.12.1/esri-3.20.0
bower util#v1.12.1/esri-3.20.0           cached https://github.com/Esri/dojo-util.git#v1.12.1/esri-3.20.0
bower util#v1.12.1/esri-3.20.0         validate v1.12.1/esri-3.20.0 against https://github.com/Esri/dojo-util.git#v1.12.1/esri-3.20.0
bower dojox#v1.12.1/esri-3.20.0          cached https://github.com/Esri/dojox.git#v1.12.1/esri-3.20.0
bower dojox#v1.12.1/esri-3.20.0        validate v1.12.1/esri-3.20.0 against https://github.com/Esri/dojox.git#v1.12.1/esri-3.20.0
bower dgrid#v1.1.0/esri-3.20.0           cached https://github.com/Esri/dgrid.git#v1.1.0/esri-3.20.0
bower dgrid#v1.1.0/esri-3.20.0         validate v1.1.0/esri-3.20.0 against https://github.com/Esri/dgrid.git#v1.1.0/esri-3.20.0
bower dijit#v1.12.1/esri-3.20.0          cached https://github.com/Esri/dijit.git#v1.12.1/esri-3.20.0
bower dijit#v1.12.1/esri-3.20.0        validate v1.12.1/esri-3.20.0 against https://github.com/Esri/dijit.git#v1.12.1/esri-3.20.0
bower dstore#1.1.1                       cached https://github.com/SitePen/dstore.git#1.1.1
bower dstore#1.1.1                     validate 1.1.1 against https://github.com/SitePen/dstore.git#1.1.1
bower moment#2.17.1                      cached https://github.com/moment/moment.git#2.17.1
bower moment#2.17.1                    validate 2.17.1 against https://github.com/moment/moment.git#2.17.1
bower dojo#>=1.8.9                       cached https://github.com/dojo/dojo.git#1.12.2
bower dojo#>=1.8.9                     validate 1.12.2 against https://github.com/dojo/dojo.git#>=1.8.9
bower dijit#1.12.1                       cached https://github.com/dojo/dijit.git#1.12.1
bower dijit#1.12.1                     validate 1.12.1 against https://github.com/dojo/dijit.git#1.12.1
bower dojox#1.12.1                       cached https://github.com/dojo/dojox.git#1.12.1
bower dojox#1.12.1                     validate 1.12.1 against https://github.com/dojo/dojox.git#1.12.1
bower dojo-themes#1.12.1                 cached https://github.com/dojo/themes.git#1.12.1
bower dojo-themes#1.12.1               validate 1.12.1 against https://github.com/dojo/themes.git#1.12.1
bower dojo#>=1.8.1                       cached https://github.com/dojo/dojo.git#1.12.2
bower dojo#>=1.8.1                     validate 1.12.2 against https://github.com/dojo/dojo.git#>=1.8.1
bower dojo#1.12.1                        cached https://github.com/dojo/dojo.git#1.12.1
bower dojo#1.12.1                      validate 1.12.1 against https://github.com/dojo/dojo.git#1.12.1
bower                                 ECONFLICT Unable to find suitable version for dojo
EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2017-05-25 17:20:33

我找到了解决办法。在使用gitBash接口时,这似乎是windows机器上的一个问题。gitBash不允许用户交互响应选择依赖项的特定版本的提示,只显示错误消息。

我转而使用gitCMD提示符而不是gitBash。一旦切换到gitCMD并运行相同的bower install arcgis-js-api命令,就会出现选择依赖项的问题,我就能够成功地选择它们并完成安装。

我希望这能帮助其他在窗户上使用凉亭的人。

票数 1
EN

Stack Overflow用户

发布于 2017-05-25 16:25:24

我还没能复制这个问题。如果我做的只是bower install arcgis-js-api,我可以选择选择我的决心。如果我使用您发布的bower.json,我会收到警告,但没有错误。

Please note that, esri#3.15.0 depends on dojo#v1.10.4/esri-3.14.0 which resolved to dojo#v1.10.4/esri-3.14.0 dstore#1.1.0 depends on dojo#>=1.8.1 which resolved to dojo#1.12.2 Resort to using dojo#v1.10.4/esri-3.14.0 which resolved to dojo#v1.10.4/esri-3.14.0 Code incompatibilities may occur.

很好,只是鲍尔警告你要小心行事。

你试过bower cache clean吗?

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/44125391

复制
相关文章

相似问题

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