【问题标题】:Mean.IO + Heroku Build Failing Error: ENOENT, no such file or directory '/app/bower_components/jquery/dist/jquery.min.map'Mean.IO + Heroku 构建失败错误:ENOENT,没有这样的文件或目录'/app/bower_components/jquery/dist/jquery.min.map'
【发布时间】:2015-01-06 00:23:12
【问题描述】:

我有一个使用 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 明智。有什么想法吗?

【问题讨论】:

    标签: node.js heroku gruntjs mean.io


    【解决方案1】:

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

    【讨论】:

      【解决方案2】:

      来自文档

      http://learn.mean.io/#m-e-a-n-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
      

      【讨论】:

        猜你喜欢
        • 2019-05-08
        • 1970-01-01
        • 2021-04-09
        • 2019-06-01
        • 2021-03-30
        • 2018-10-26
        • 1970-01-01
        • 1970-01-01
        • 2020-09-14
        相关资源
        最近更新 更多