问题部署约曼应用的Heroku(Problems Deploying Yeoman app to H

2019-10-24 04:00发布

我一直在尝试部署我AngularFullstack(节点)应用的Heroku。 :我在与该终端所创建的应用程序yo angular-fullstack 。 每当我尝试部署到Heroku的,我得到了以下的时候,我去我的部署应用程序:

应用程序错误

在应用程序中出现错误,你的页面无法送达。 请稍后重试。

如果您是应用所有者,请检查您的日志的详细信息。

日志是:

2015-07-24T06:57:35.184227+00:00 heroku[web.1]: State changed from up to starting
2015-07-24T06:57:38.772056+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2015-07-24T06:57:39.757747+00:00 app[web.1]: Error waiting for process to terminate: No child processes
2015-07-24T06:57:40.645233+00:00 heroku[web.1]: Process exited with status 22
2015-07-24T06:57:49.314501+00:00 heroku[web.1]: Starting process with command `npm start`
2015-07-24T06:57:51.176323+00:00 app[web.1]: Detected 512 MB available memory, 512 MB limit per process (WEB_MEMORY)
2015-07-24T06:57:51.176346+00:00 app[web.1]: Recommending WEB_CONCURRENCY=1
2015-07-24T06:57:51.863498+00:00 app[web.1]: > startup@0.0.0 start /app
2015-07-24T06:57:51.863492+00:00 app[web.1]: 
2015-07-24T06:57:51.863500+00:00 app[web.1]: > node server/app.js
2015-07-24T06:57:51.863501+00:00 app[web.1]: 
2015-07-24T06:57:52.919124+00:00 app[web.1]: npm ERR! Linux 3.13.0-57-generic
2015-07-24T06:57:52.926086+00:00 app[web.1]: npm ERR! Please include the following file with any support request:
2015-07-24T06:57:52.926206+00:00 app[web.1]: npm ERR!     /app/npm-debug.log
2015-07-24T06:57:52.852124+00:00 app[web.1]: fs.js:0
2015-07-24T06:57:52.852131+00:00 app[web.1]: (function (exports, require, module, __filename, __dirname) { // Copyright Joy
2015-07-24T06:57:52.852132+00:00 app[web.1]: 
2015-07-24T06:57:52.852133+00:00 app[web.1]: Error: ENOENT, no such file or directory '/app/public/favicon.ico'
2015-07-24T06:57:52.852135+00:00 app[web.1]:     at Error (native)
2015-07-24T06:57:52.852136+00:00 app[web.1]:     at Object.fs.statSync (fs.js:797:18)
2015-07-24T06:57:52.852137+00:00 app[web.1]:     at favicon (/app/node_modules/serve-favicon/index.js:47:15)
2015-07-24T06:57:52.852139+00:00 app[web.1]:     at module.exports (/app/server/config/express.js:32:13)
2015-07-24T06:57:52.852140+00:00 app[web.1]:     at Object.<anonymous> (/app/server/app.js:35:28)
2015-07-24T06:57:52.852141+00:00 app[web.1]:     at Module._compile (module.js:460:26)
2015-07-24T06:57:52.852142+00:00 app[web.1]:     at Object.Module._extensions..js (module.js:478:10)
2015-07-24T06:57:52.852144+00:00 app[web.1]:     at Function.Module._load (module.js:310:12)
2015-07-24T06:57:52.852143+00:00 app[web.1]:     at Module.load (module.js:355:32)
2015-07-24T06:57:52.852146+00:00 app[web.1]:     at Function.Module.runMain (module.js:501:10)
2015-07-24T06:57:52.893865+00:00 app[web.1]: 
2015-07-24T06:57:52.919677+00:00 app[web.1]: npm ERR! argv "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "start"
2015-07-24T06:57:52.919919+00:00 app[web.1]: npm ERR! node v0.12.7
2015-07-24T06:57:52.920832+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2015-07-24T06:57:52.920669+00:00 app[web.1]: npm ERR! npm  v2.11.3
2015-07-24T06:57:52.921015+00:00 app[web.1]: npm ERR! startup@0.0.0 start: `node server/app.js`
2015-07-24T06:57:52.921148+00:00 app[web.1]: npm ERR! Exit status 1
2015-07-24T06:57:52.921496+00:00 app[web.1]: npm ERR! Failed at the startup@0.0.0 start script 'node server/app.js'.
2015-07-24T06:57:52.921314+00:00 app[web.1]: npm ERR! 
2015-07-24T06:57:52.921680+00:00 app[web.1]: npm ERR! This is most likely a problem with the startup package,
2015-07-24T06:57:52.922108+00:00 app[web.1]: npm ERR!     node server/app.js
2015-07-24T06:57:52.921833+00:00 app[web.1]: npm ERR! not with npm itself.
2015-07-24T06:57:52.921968+00:00 app[web.1]: npm ERR! Tell the author that this fails on your system:
2015-07-24T06:57:52.922254+00:00 app[web.1]: npm ERR! You can get their info via:
2015-07-24T06:57:52.922518+00:00 app[web.1]: npm ERR! There is likely additional logging output above.
2015-07-24T06:57:52.922373+00:00 app[web.1]: npm ERR!     npm owner ls startup
2015-07-24T06:57:52.925618+00:00 app[web.1]: 
2015-07-24T06:57:53.972027+00:00 heroku[web.1]: State changed from starting to crashed
2015-07-24T06:57:53.972984+00:00 heroku[web.1]: State changed from crashed to starting
2015-07-24T06:57:53.956209+00:00 heroku[web.1]: Process exited with status 1
2015-07-24T06:58:17.709969+00:00 heroku[web.1]: Starting process with command `npm start`
2015-07-24T06:58:20.882672+00:00 app[web.1]: Detected 512 MB available memory, 512 MB limit per process (WEB_MEMORY)
2015-07-24T06:58:20.898495+00:00 app[web.1]: Recommending WEB_CONCURRENCY=1
2015-07-24T06:58:22.481040+00:00 app[web.1]: 
2015-07-24T06:58:22.481045+00:00 app[web.1]: > startup@0.0.0 start /app
2015-07-24T06:58:22.481047+00:00 app[web.1]: > node server/app.js
2015-07-24T06:58:22.481048+00:00 app[web.1]: 
2015-07-24T06:58:23.526831+00:00 app[web.1]: npm ERR! Linux 3.13.0-49-generic
2015-07-24T06:58:23.502777+00:00 app[web.1]: fs.js:0
2015-07-24T06:58:23.502783+00:00 app[web.1]: (function (exports, require, module, __filename, __dirname) { // Copyright Joy
2015-07-24T06:58:23.502785+00:00 app[web.1]: 
2015-07-24T06:58:23.502786+00:00 app[web.1]: Error: ENOENT, no such file or directory '/app/public/favicon.ico'
2015-07-24T06:58:23.502791+00:00 app[web.1]:     at favicon (/app/node_modules/serve-favicon/index.js:47:15)
2015-07-24T06:58:23.502788+00:00 app[web.1]:     at Error (native)
2015-07-24T06:58:23.502789+00:00 app[web.1]:     at Object.fs.statSync (fs.js:797:18)
2015-07-24T06:58:23.502792+00:00 app[web.1]:     at module.exports (/app/server/config/express.js:32:13)
2015-07-24T06:58:23.502793+00:00 app[web.1]:     at Object.<anonymous> (/app/server/app.js:35:28)
2015-07-24T06:58:23.502795+00:00 app[web.1]:     at Object.Module._extensions..js (module.js:478:10)
2015-07-24T06:58:23.502794+00:00 app[web.1]:     at Module._compile (module.js:460:26)
2015-07-24T06:58:23.502797+00:00 app[web.1]:     at Module.load (module.js:355:32)
2015-07-24T06:58:23.502798+00:00 app[web.1]:     at Function.Module._load (module.js:310:12)
2015-07-24T06:58:23.502799+00:00 app[web.1]:     at Function.Module.runMain (module.js:501:10)
2015-07-24T06:58:23.521999+00:00 app[web.1]: 
2015-07-24T06:58:23.527299+00:00 app[web.1]: npm ERR! argv "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "start"
2015-07-24T06:58:23.527497+00:00 app[web.1]: npm ERR! node v0.12.7
2015-07-24T06:58:23.527870+00:00 app[web.1]: npm ERR! npm  v2.11.3
2015-07-24T06:58:23.528052+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2015-07-24T06:58:23.528208+00:00 app[web.1]: npm ERR! startup@0.0.0 start: `node server/app.js`
2015-07-24T06:58:23.528350+00:00 app[web.1]: npm ERR! Exit status 1
2015-07-24T06:58:23.528500+00:00 app[web.1]: npm ERR! 
2015-07-24T06:58:23.528642+00:00 app[web.1]: npm ERR! Failed at the startup@0.0.0 start script 'node server/app.js'.
2015-07-24T06:58:23.529501+00:00 app[web.1]: npm ERR! not with npm itself.
2015-07-24T06:58:23.529998+00:00 app[web.1]: npm ERR! Tell the author that this fails on your system:
2015-07-24T06:58:23.529302+00:00 app[web.1]: npm ERR! This is most likely a problem with the startup package,
2015-07-24T06:58:23.530188+00:00 app[web.1]: npm ERR!     node server/app.js
2015-07-24T06:58:23.530706+00:00 app[web.1]: npm ERR! You can get their info via:
2015-07-24T06:58:23.530887+00:00 app[web.1]: npm ERR!     npm owner ls startup
2015-07-24T06:58:23.531127+00:00 app[web.1]: npm ERR! There is likely additional logging output above.
2015-07-24T06:58:23.533571+00:00 app[web.1]: 
2015-07-24T06:58:23.533831+00:00 app[web.1]: npm ERR! Please include the following file with any support request:
2015-07-24T06:58:23.534025+00:00 app[web.1]: npm ERR!     /app/npm-debug.log
2015-07-24T06:58:24.420694+00:00 heroku[web.1]: Process exited with status 1
2015-07-24T06:58:24.435391+00:00 heroku[web.1]: State changed from starting to crashed

起初我还以为是我的图标问题,但走动,并与多家服务器/配置文件修修补补之后我尝试上传不同AngularFullstack应用程序,我已经成功地把在Heroku。 当我试图重新上传它,它会产生即使我可以对自己的Heroku应用程序更新它的确切同样的错误。 我也试过在创建情况下,一个问题被破坏,但我仍然得到同样的错误其他的Heroku应用。 这让我觉得这是什么毛病我想上传到Heroku的方式。

考虑到这一点,这里有我想要部署到Heroku的步骤:

  1. $ cd dir
  2. $ heroku login
  3. $ heroku git:remote -a nameOfApp
  4. $ git init
  5. $ git add .
  6. $ git add -A
  7. $ git commit -m "doesntMatter"
  8. $ git push -f heroku

Answer 1:

下面是我试图部署到Heroku的步骤:1)$ CD DIR 2)$的Heroku登录3)$的Heroku的git:远程-a nameOfApp 4)$的git的init 5)$ git的补充。 6)$ GIT中添加-A 7)$ git的承诺-m “doesntMatter” 8)$ GIT中推-f heroku上

不这样做!


推约曼堆栈的Heroku,你必须做到:

grunt build
grunt buildcontrol:heroku

从那时起:

  1. 你会避免在犯的错误,你刚。
  2. 如果有的话,你将能够看到在该步骤中失败。

如果仍然没有帮助,你可能想看看这个:

  • 是你的图标文件可读? 对于一些原因,从繁重的图像极小可能会打破它,当预期不启动咕噜。 如果不是,将其更改并检查您应用中的其他图像文件是否可读。

      Warning: Running "imagemin:dist" (imagemin) task Warning: Error: Command failed: /Users/stephane/Code/node/myapp/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/imagemin-optipng/node_modules/optipng-bin/vendor/optipng -strip all -clobber -force -fix -o 3 -out /var/folders/1n/66pmh3zx3gj764pbfymx6rmh0000gn/T/7076e223-ac82-4405-96ba-af48869c6180 /var/folders/1n/66pmh3zx3gj764pbfymx6rmh0000gn/T/00efe7c1-9ec2-42a1-80bc-47c3fa7a7578 * Processing: /var/folders/1n/66pmh3zx3gj764pbfymx6rmh0000gn/T/00efe7c1-9ec2-42a1-80bc-47c3fa7a7578 Error: PNG file appears to be corrupted by text file conversions * Status report 1 file(s) have been processed. 1 error(s) have been encountered. in file client/assets/images/picture123.png Use --force to continue. 
  • 尝试npm cache clean && npm install gruntjs/grunt-contrib-imagemin从https://github.com/gruntjs/grunt-contrib-imagemin/issues/214 。 而npm install grunt-contrib-imagemin也貌似是在这种情况下非常有用:

      Warning: jit-grunt: Plugin for the "imagemin" task not found. If you have installed the plugin already, please setting the static mapping. See https://github.com/shootaroo/jit-grunt#static-mappings Warning: Task "imagemin" not found. Use --force to continue. 


文章来源: Problems Deploying Yeoman app to Heroku