1

我有一个使用 Mean.IO 编写并部署到 Heroku 的应用程序(Buildpack https://github.com/mbuchetics/heroku-buildpack-nodejs-grunt)。

直到今天早上我最近一次部署之前一直很好,并且没有明显的原因就坏了。鲍尔似乎运行良好

2015-01-06T00:09:50.851963+00:00 app[web.1]: Error: ENOENT, no such file or directory '/app/bower_components/jquery/dist/jquery.min.map'
2015-01-06T00:09:50.851967+00:00 app[web.1]:     at Object.fs.openSync (fs.js:439:18)
2015-01-06T00:09:50.851969+00:00 app[web.1]:     at Object.fs.readFileSync (fs.js:290:15)
2015-01-06T00:09:50.851979+00:00 app[web.1]:     at Promise.<anonymous> (/app/node_modules/mongoose/node_modules/mpromise/lib/promise.js:177:8)
2015-01-06T00:09:50.851984+00:00 app[web.1]:     at Promise.fulfill (/app/node_modules/mongoose/node_modules/mpromise/lib/promise.js:97:20)
2015-01-06T00:09:50.851982+00:00 app[web.1]:     at Promise.emit (/app/node_modules/mongoose/node_modules/mpromise/lib/promise.js:84:38)
2015-01-06T00:09:50.851985+00:00 app[web.1]:     at Object.cb (/app/node_modules/mongoose/lib/query.js:1146:30)
2015-01-06T00:09:50.851981+00:00 app[web.1]:     at Promise.emit (events.js:95:17)
2015-01-06T00:09:50.851976+00:00 app[web.1]:     at Config.onPackageRead (/app/node_modules/meanio/lib/config.js:101:25)
2015-01-06T00:09:50.869507+00:00 app[web.1]: Worker 11 died :(

相关部署代码在这里

-----> Installing dependencies
       npm WARN package.json karma-chrome-launcher@0.1.7 No README data
       npm WARN package.json karma-coffee-preprocessor@0.2.1 No README data
       npm WARN package.json karma-coverage@0.2.7 No README data
       npm WARN package.json karma-phantomjs-launcher@0.1.4 No README data

       > mean@0.4.2 postinstall /tmp/build_f7b66ed6667be26db9cf377edd6379ea
       > node node_modules/meanio/node_modules/mean-cli/bin/mean-postinstall

       Installing Bower dependencies
       Auto installing package dependencies
       Auto installing package dependencies
       Installing module: mean-admin:
       git clone --branch master https://git.mean.io/linnovate/mean-admin.git packages/contrib/mean-admin
           Dependencies installed for package access
           Dependencies installed for package articles
           Dependencies installed for package system
           Dependencies installed for package theme
           Dependencies installed for package users
           Dependencies installed for package dashboard
           Dependencies installed for package linktexting


       > mean-health@0.1.7 postinstall /tmp/build_f7b66ed6667be26db9cf377edd6379ea/packages/contrib/mean-admin/node_modules/mean-health
       > node ./postinstall.js

       Error: ENOENT, open '.bower-cache/fe2fe255e91d251051d543998aa8327a-1.11.2.lock'
       gridfs-stream@0.5.3 node_modules/gridfs-stream

       mean-health@0.1.7 node_modules/mean-health

       request@2.51.0 node_modules/request
           Dependencies installed for package mean-admin
-----> Caching node_modules directory for future builds
-----> Cleaning up node-gyp and npm artifacts
-----> Building runtime environment
-----> Exporting config vars to environment
grunt-cli@0.1.13 node_modules/grunt-cli
├── resolve@0.3.1
├── nopt@1.0.10 (abbrev@1.0.5)
└── findup-sync@0.1.3 (glob@3.2.11)
grunt@0.4.5 node_modules/grunt
-----> Found Gruntfile, running grunt heroku:development task
Running "cssmin:core" (cssmin) task
>> Destination not written because minified CSS was empty.

Running "uglify:core" (uglify) task
>> Destination bower_components/build/js/dist.min.js not written because src files were empty.

Done, without errors.

我看到这条线

Error: ENOENT, open '.bower-cache/fe2fe255e91d251051d543998aa8327a-1.11.2.lock'

但我不确定这意味着 heroku 明智。有任何想法吗?

4

2 回答 2

1

尝试运行bower update它将安装缺少的 jQuery 依赖项

于 2015-06-04T19:25:00.620 回答
-2

从文档

http://learn.mean.io/#mean-stack-more-information

**Update NPM, Bower or Grunt**

Sometimes you may find there is a weird error during install 
like npm’s Error: ENOENT. Usually updating those tools to 
the latest version solves the issue.

Updating NPM:
$ npm update -g npm

Updating Grunt:
$ npm update -g grunt-cli

Updating Bower:
$ npm update -g bower
于 2015-01-15T07:58:08.107 回答