首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >bower安装丢失的文件

bower安装丢失的文件
EN

Stack Overflow用户
提问于 2014-07-25 04:29:12
回答 2查看 7.9K关注 0票数 6

我正在运行bower install insider my dir。它会创建一个bower_components文件夹,但是缺少一些.js文件。

代码语言:javascript
复制
GET /customapp/customapp.controller.js 304 7ms
GET /customapp/testmodal.controller.js 304 5ms
GET /bower_components/bootstrap/dist/js/bootstrap.js 404 1ms
GET /bower_components/bootstrap/js/tooltip.js 404 1ms
GET /bower_components/bootstrap/js/popover.js 404 1ms
GET /bower_components/angular-resource/angular-resource.js 404 1ms
GET /bower_components/angular-cookies/angular-cookies.js 404 0ms
GET /bower_components/angular-sanitize/angular-sanitize.js 404 1ms
GET /bower_components/angular-route/angular-route.js 404 1ms
GET /bower_components/angular-grid/build/ng-grid.js 404 1ms
GET /bower_components/angular-bootstrap/ui-bootstrap.js 404 1ms
GET /bower_components/angular-bootstrap/ui-bootstrap-tpls.js 404 1ms
GET /bower_components/angular-google-chart/ng-google-chart.js 404 1ms
GET /bower_components/moment/moment.js 404 1ms
GET /bower_components/angular-moment/angular-moment.js 404 1ms
GET /bower_components/jquery-ui/ui/jquery-ui.js 404 1ms
GET /bower_components/angular-ui-calendar/src/calendar.js 404 1ms
GET /bower_components/fullcalendar/fullcalendar.js 404 1ms
GET /bower_components/fullcalendar/gcal.js 404 0ms
GET /bower_components/tinymce/tinymce.min.js 404 1ms
GET /bower_components/angular-ui-tinymce/src/tinymce.js 404 1ms

我试着删除目录并重新安装,但它不能正确安装。这些文件总是在我的bower_components目录中丢失...

我已经在我的整个文件系统上搜索了丢失的文件,它们不在那里,这就是为什么404。

在完成npm安装之后,我正在使用这个bower.json文件在我的本地目录中安装bower

代码语言:javascript
复制
{
  "name": "sccd-ng",
  "version": "0.0.1",
  "main": "app.js",
  "moduleType": [
    "node"
  ],
  "license": "xyz",
  "private": true,
  "dependencies": {
    "angular": "1.2.16",
    "angular-cookies": "1.2.16",
    "angular-google-chart": "~0.0.8",
    "angular-mocks": "1.2.16",
    "angular-scenario": "1.2.16",
    "angular-sanitize": "1.2.16",
    "angular-grid": "2.0.11",
    "angular-route": "1.2.16",
    "bootstrap": "~3.0.3",
    "es5-shim": "~2.1.0",
    "json3": "~3.2.6",
    "moment": "2.5.1",
    "angular-resource": "1.2.16",
    "angular-moment": "~0.6.2",
    "jquery": "2.1.1",
    "jquery-ui": "~1.10.4",
    "angular-ui-calendar": "latest",
    "angular-bootstrap": "~0.11.0",
    "angular-ui-tinymce": "latest",
    "vis": "latest"
  },
  "resolutions": {
    "jquery": "2.1.1"
  }
}

运行bower install && find。-name bootstrap.js

代码语言:javascript
复制
$ bower install && find . -name bootstrap.js
bower cached        git://github.com/angular/bower-angular.git#1.2.16
bower validate      1.2.16 against git://github.com/angular/bower-angular.git#1.
2.16
bower cached        git://github.com/angular/bower-angular-route.git#1.2.16
bower validate      1.2.16 against git://github.com/angular/bower-angular-route.
git#1.2.16
bower cached        git://github.com/angular/bower-angular-cookies.git#1.2.16
bower validate      1.2.16 against git://github.com/angular/bower-angular-cookie
s.git#1.2.16
bower cached        git://github.com/twbs/bootstrap.git#3.0.3
bower validate      3.0.3 against git://github.com/twbs/bootstrap.git#~3.0.3
bower cached        git://github.com/moment/moment.git#2.5.1
bower validate      2.5.1 against git://github.com/moment/moment.git#2.5.1
bower cached        git://github.com/angular/bower-angular-mocks.git#1.2.16
bower validate      1.2.16 against git://github.com/angular/bower-angular-mocks.
git#1.2.16
bower cached        git://github.com/angular-ui/ng-grid.git#2.0.11
bower validate      2.0.11 against git://github.com/angular-ui/ng-grid.git#2.0.1
1
bower cached        git://github.com/bouil/angular-google-chart.git#0.0.10
bower validate      0.0.10 against git://github.com/bouil/angular-google-chart.g
it#~0.0.8
bower cached        git://github.com/bestiejs/json3.git#3.2.6
bower validate      3.2.6 against git://github.com/bestiejs/json3.git#~3.2.6
bower cached        git://github.com/angular/bower-angular-sanitize.git#1.2.16
bower validate      1.2.16 against git://github.com/angular/bower-angular-saniti
ze.git#1.2.16
bower cached        git://github.com/angular/bower-angular-resource.git#1.2.16
bower validate      1.2.16 against git://github.com/angular/bower-angular-resour
ce.git#1.2.16
bower cached        git://github.com/jquery/jquery.git#2.1.1
bower validate      2.1.1 against git://github.com/jquery/jquery.git#2.1.1
bower cached        git://github.com/urish/angular-moment.git#0.6.2
bower validate      0.6.2 against git://github.com/urish/angular-moment.git#~0.6
.2
bower cached        git://github.com/components/jqueryui.git#1.10.4
bower validate      1.10.4 against git://github.com/components/jqueryui.git#~1.1
0.4
bower cached        git://github.com/es-shims/es5-shim.git#2.1.0
bower validate      2.1.0 against git://github.com/es-shims/es5-shim.git#~2.1.0
bower cached        git://github.com/angular/bower-angular-scenario.git#1.2.16
bower validate      1.2.16 against git://github.com/angular/bower-angular-scenar
io.git#1.2.16
bower cached        git://github.com/angular-ui/ui-calendar.git#0.8.1
bower validate      0.8.1 against git://github.com/angular-ui/ui-calendar.git#*
bower cached        git://github.com/angular-ui/ui-tinymce.git#0.0.5
bower validate      0.0.5 against git://github.com/angular-ui/ui-tinymce.git#*
bower cached        git://github.com/angular-ui/bootstrap-bower.git#0.11.0
bower validate      0.11.0 against git://github.com/angular-ui/bootstrap-bower.g
it#~0.11.0
bower cached        git://github.com/almende/vis.git#3.1.0
bower validate      3.1.0 against git://github.com/almende/vis.git#*
bower cached        git://github.com/jozzhart/tinymce.git#4.0.0
bower validate      4.0.0 against git://github.com/jozzhart/tinymce.git#4.0.0
bower cached        git://github.com/angular/bower-angular.git#1.3.0-build.2974+
sha.f3a763f
bower validate      1.3.0-build.2974+sha.f3a763f against git://github.com/angula
r/bower-angular.git#~1.3
bower cached        git://github.com/arshaw/fullcalendar.git#1.6.4
bower validate      1.6.4 against git://github.com/arshaw/fullcalendar.git#~1.x
bower cached        git://github.com/jquery/jquery.git#1.11.1
bower validate      1.11.1 against git://github.com/jquery/jquery.git#^1.8.0
bower new           version for git://github.com/angular/bower-angular.git#~1.3
bower resolve       git://github.com/angular/bower-angular.git#~1.3
bower download      https://github.com/angular/bower-angular/archive/v1.3.0-buil
d.2982+sha.86340a5.tar.gz
bower cached        git://github.com/jquery/jquery.git#1.10.2
bower validate      1.10.2 against git://github.com/jquery/jquery.git#~1.10.2
bower extract       angular#~1.3 archive.tar.gz
bower invalid-meta  angular is missing "ignore" entry in bower.json
bower resolved      git://github.com/angular/bower-angular.git#1.3.0-build.2982+
sha.86340a5

Unable to find a suitable version for angular, please choose one:
    1) angular#1.2.16 which resolved to 1.2.16 and is required by angular-cookie
s#1.2.16, angular-mocks#1.2.16, angular-resource#1.2.16, angular-route#1.2.16, a
ngular-sanitize#1.2.16, angular-scenario#1.2.16, sccd-ng
    2) angular#~1.x which resolved to 1.2.16 and is required by angular-ui-tinym
ce#0.0.5
    3) angular#>=1 which resolved to 1.2.16 and is required by angular-bootstrap
#0.11.0
    4) angular#^1.0.8 which resolved to 1.2.16 and is required by angular-grid#2
.0.11
    5) angular#~1.2.x which resolved to 1.2.16 and is required by angular-ui-cal
endar#0.8.1
    6) angular#>=1.0.0 <1.3.0 which resolved to 1.2.16 and is required by angula
r-moment#0.6.2
    7) angular#~1.3 which resolved to 1.3.0-build.2982+sha.86340a5 and is requir
ed by angular-google-chart#0.0.10

Prefix the choice with ! to persist it to bower.json


[?] Answer: 1

Please note that,
    fullcalendar#1.6.4 depends on jquery#~1.10.2 which resolved to jquery#1.10.2

    angular-grid#2.0.11 depends on jquery#^1.8.0 which resolved to jquery#1.11.1

    sccd-ng depends on jquery#2.1.1 which resolved to jquery#2.1.1
    jquery-ui#1.10.4 depends on jquery#>=1.6 which resolved to jquery#2.1.1
    angular-ui-calendar#0.8.1 depends on jquery#~2.x which resolved to jquery#2.
1.1
    bootstrap#3.0.3 depends on jquery#>= 1.9.0 which resolved to jquery#2.1.1

Resort to using jquery#2.1.1 which resolved to jquery#2.1.1
Code incompatibilities may occur.

bower install       angular-ui-tinymce#0.0.5
bower install       angular-bootstrap#0.11.0
bower install       angular-ui-calendar#0.8.1
bower install       angular-moment#0.6.2
bower install       vis#3.1.0
bower install       angular-google-chart#0.0.10
bower install       json3#3.2.6
bower install       es5-shim#2.1.0
bower install       angular-grid#2.0.11
bower install       angular-route#1.2.16
bower install       angular-resource#1.2.16
bower install       angular-scenario#1.2.16
bower install       angular#1.2.16
bower install       angular-sanitize#1.2.16
bower install       jquery#2.1.1
bower install       tinymce#4.0.0
bower install       jquery-ui#1.10.4
bower install       fullcalendar#1.6.4
bower install       moment#2.5.1
bower install       angular-mocks#1.2.16
bower install       angular-cookies#1.2.16
bower install       bootstrap#3.0.3

angular-ui-tinymce#0.0.5 bower_components\angular-ui-tinymce
├── angular#1.2.16
└── tinymce#4.0.0

angular-bootstrap#0.11.0 bower_components\angular-bootstrap
└── angular#1.2.16

angular-ui-calendar#0.8.1 bower_components\angular-ui-calendar
├── angular#1.2.16
├── fullcalendar#1.6.4
├── jquery#2.1.1
└── jquery-ui#1.10.4

angular-moment#0.6.2 bower_components\angular-moment
├── angular#1.2.16
└── moment#2.5.1

vis#3.1.0 bower_components\vis

angular-google-chart#0.0.10 bower_components\angular-google-chart
└── angular#1.2.16

json3#3.2.6 bower_components\json3

es5-shim#2.1.0 bower_components\es5-shim

angular-grid#2.0.11 bower_components\angular-grid
├── angular#1.2.16
└── jquery#2.1.1

angular-route#1.2.16 bower_components\angular-route
└── angular#1.2.16

angular-resource#1.2.16 bower_components\angular-resource
└── angular#1.2.16

angular-scenario#1.2.16 bower_components\angular-scenario
└── angular#1.2.16

angular#1.2.16 bower_components\angular

angular-sanitize#1.2.16 bower_components\angular-sanitize
└── angular#1.2.16

jquery#2.1.1 bower_components\jquery

tinymce#4.0.0 bower_components\tinymce

jquery-ui#1.10.4 bower_components\jquery-ui
└── jquery#2.1.1

fullcalendar#1.6.4 bower_components\fullcalendar
└── jquery#2.1.1

moment#2.5.1 bower_components\moment

angular-mocks#1.2.16 bower_components\angular-mocks
└── angular#1.2.16

angular-cookies#1.2.16 bower_components\angular-cookies
└── angular#1.2.16

bootstrap#3.0.3 bower_components\bootstrap
└── jquery#2.1.1
EN

回答 2

Stack Overflow用户

发布于 2014-08-08 07:53:37

执行bower缓存清理,然后重命名bower_components并再次执行bower安装修复了此问题。

票数 10
EN

Stack Overflow用户

发布于 2015-01-07 10:01:03

原因(?):

在以下情况下,我可以可靠地重现此问题:

通过Grunt任务运行器运行我的平均堆栈应用程序的

  1. :为了简化deployment

,git中的node --debug server.js

  • Switching分支从我的development分支到release
  • 我的development分支直接从Grunt release分支拉取所有包release分支具有签入的最小化实例

  1. 此时,我的bower目录public/lib/处于错误状态,出现问题。

我的解决方案是:

在更改branches

  • there is no 2
  1. 之前停止所有节点进程

如上所述,如果您遇到这种情况,请使用核弹删除您的bower库。这对我来说很有用,但如果缓存仍然损坏,你也可以清理缓存。

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

https://stackoverflow.com/questions/24943380

复制
相关文章

相似问题

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