凉亭安装丢失的文件

时间:2014-07-24 20:29:12

标签: node.js bower

我正在运行bower安装内部我的目录。 它创建了一个bower_components文件夹,但缺少一些.js文件..

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

我曾尝试删除dir并重新安装,但它无法正确安装。我的bower_components目录中总是缺少这些文件...

我在整个文件系统中搜索了丢失的文件,它们不在那里,这就是404的原因。

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

{
  "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"
  }
}

跑步凉亭安装&&找 。 -name bootstrap.js

$ 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

2 个答案:

答案 0 :(得分:9)

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

答案 1 :(得分:0)

原因(?):

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

  1. 通过Grunt任务运行程序运行我的mean-stack应用程序:node --debug server.js
  2. 将git中的分支从我的development分支切换到release
    • 我的development分支从bower install
    • 直接拉出所有凉亭套餐
    • 我的release分支已将已签入的实例缩小以简化部署
  3. 此时,我的凉亭目录public/lib/处于不良状态,并且出现问题。
  4. 我的解决方案:

    1. 在更改分支之前停止任何节点进程
    2. 没有2
    3. 如上所述,如果你遇到这种情况,请打开你的凉亭库。这对我来说很有用,但如果它仍然坏了,你也可以清理你的缓存。