Heroku build successful, application error

214
May 05, 2018, at 2:40 PM

I'm using the MEANjs Stack version 0.6.0 and I'm using Heroku to deploy my application. Heroku builds the application just find every single time, but I keep on getting "Application Error" whenever I go to the site (shpeuf.herokuapp.com). I have enabled Automatic Deploys from my Github repo.

BUILD LOG:

-----> Deleting 0 files matching .slugignore patterns.
-----> Node.js app detected
-----> Creating runtime environment
     NPM_CONFIG_LOGLEVEL=error
     NODE_VERBOSE=false
     NODE_ENV=production
     NODE_MODULES_CACHE=true
-----> Installing binaries
     engines.node (package.json):  >=6.10.0
     engines.npm (package.json):   >=3.10.8
     Resolving node version >=6.10.0...
     Downloading and installing node 10.0.0...
     Bootstrapping npm >=3.10.8 (replacing 5.6.0)...
     npm 6.0.0 installed
-----> Restoring cache
     Loading 2 from cacheDirectories (default):
     - node_modules
     - bower_components (not cached - skipping)
-----> Building dependencies
     Installing node modules (package.json + package-lock)
     > meanjs@0.6.0 postinstall /tmp/build_a4895512bd626f95bfe5d944f110dc43
     > npm run bower

     > meanjs@0.6.0 bower /tmp/build_a4895512bd626f95bfe5d944f110dc43
     > bower install --allow-root && bower prune --allow-root
       bower angular-animate#~1.5.0       not-cached https://github.com/angular/bower-angular-animate.git#~1.5.0
       bower angular-animate#~1.5.0          resolve https://github.com/angular/bower-angular-animate.git#~1.5.0
     bower angular-bootstrap#~1.2.1     not-cached https://github.com/angular-ui/bootstrap-bower.git#~1.2.1
       bower angular-bootstrap#~1.2.1        resolve https://github.com/angular-ui/bootstrap-bower.git#~1.2.1
       bower angular-ui-notification#~0.2.0       not-cached https://github.com/alexcrack/angular-ui-notification.git#~0.2.0
       bower angular-ui-notification#~0.2.0          resolve https://github.com/alexcrack/angular-ui-notification.git#~0.2.0
       bower angular-ui-router#~0.2.18            not-cached https://github.com/angular-ui/angular-ui-router-bower.git#~0.2.18
         bower angular-ui-router#~0.2.18               resolve https://github.com/angular-ui/angular-ui-router-bower.git#~0.2.18
     bower owasp-password-strength-test#~1.3.0  not-cached https://github.com/viaforensics/owasp-password-strength-test.git#~1.3.0
     bower owasp-password-strength-test#~1.3.0     resolve https://github.com/viaforensics/owasp-password-strength-test.git#~1.3.0
         bower ng-file-upload#~12.1.0               not-cached https://github.com/danialfarid/angular-file-upload-bower.git#~12.1.0
         bower ng-file-upload#~12.1.0                  resolve https://github.com/danialfarid/angular-file-upload-bower.git#~12.1.0
         bower angular-resource#~1.5.0              not-cached https://github.com/angular/bower-angular-resource.git#~1.5.0
         bower angular-resource#~1.5.0                 resolve https://github.com/angular/bower-angular-resource.git#~1.5.0
         bower angular-mocks#~1.5.0                 not-cached https://github.com/angular/bower-angular-mocks.git#~1.5.0
         bower angular-mocks#~1.5.0                    resolve https://github.com/angular/bower-angular-mocks.git#~1.5.0
         bower angular-messages#~1.5.0              not-cached https://github.com/angular/bower-angular-messages.git#~1.5.0
         bower angular-messages#~1.5.0                 resolve https://github.com/angular/bower-angular-messages.git#~1.5.0
           bower bootstrap#~3.3.6                     not-cached https://github.com/twbs/bootstrap.git#~3.3.6
           bower bootstrap#~3.3.6                        resolve https://github.com/twbs/bootstrap.git#~3.3.6
           bower angular#~1.5.0                       not-cached https://github.com/angular/bower-angular.git#~1.5.0
           bower angular#~1.5.0                          resolve https://github.com/angular/bower-angular.git#~1.5.0
         bower angular-ui-router#~0.2.18              download https://github.com/angular-ui/angular-ui-router-bower/archive/0.2.18.tar.gz
         bower angular-animate#~1.5.0                 download https://github.com/angular/bower-angular-animate/archive/v1.5.11.tar.gz
         bower ng-file-upload#~12.1.0                 download https://github.com/danialfarid/angular-file-upload-bower/archive/12.1.0.tar.gz
         bower angular-bootstrap#~1.2.1               download https://github.com/angular-ui/bootstrap-bower/archive/1.2.5.tar.gz
     bower owasp-password-strength-test#~1.3.0    download https://github.com/viaforensics/owasp-password-strength-test/archive/1.3.0.tar.gz
       bower angular-ui-notification#~0.2.0         download https://github.com/alexcrack/angular-ui-notification/archive/v0.2.0.tar.gz
         bower angular-resource#~1.5.0                download https://github.com/angular/bower-angular-resource/archive/v1.5.11.tar.gz
           bower bootstrap#~3.3.6                       download https://github.com/twbs/bootstrap/archive/v3.3.7.tar.gz
           bower angular#~1.5.0                         download https://github.com/angular/bower-angular/archive/v1.5.11.tar.gz
         bower angular-messages#~1.5.0                download https://github.com/angular/bower-angular-messages/archive/v1.5.11.tar.gz
         bower angular-mocks#~1.5.0                   download https://github.com/angular/bower-angular-mocks/archive/v1.5.11.tar.gz
         bower angular-ui-router#~0.2.18               extract archive.tar.gz
         bower angular-resource#~1.5.0                 extract archive.tar.gz
         bower angular-animate#~1.5.0                  extract archive.tar.gz
     bower owasp-password-strength-test#~1.3.0     extract archive.tar.gz
       bower angular-ui-notification#~0.2.0          extract archive.tar.gz
         bower angular-messages#~1.5.0                 extract archive.tar.gz
         bower angular-mocks#~1.5.0                    extract archive.tar.gz
         bower angular-bootstrap#~1.2.1                extract archive.tar.gz
         bower ng-file-upload#~12.1.0                  extract archive.tar.gz
           bower angular#~1.5.0                          extract archive.tar.gz
         bower angular-resource#~1.5.0                resolved https://github.com/angular/bower-angular-resource.git#1.5.11
         bower angular-messages#~1.5.0                resolved https://github.com/angular/bower-angular-messages.git#1.5.11
         bower angular-animate#~1.5.0                 resolved https://github.com/angular/bower-angular-animate.git#1.5.11
         bower angular-mocks#~1.5.0                   resolved https://github.com/angular/bower-angular-mocks.git#1.5.11
     bower owasp-password-strength-test#~1.3.0    resolved https://github.com/viaforensics/owasp-password-strength-test.git#1.3.0
         bower angular-bootstrap#~1.2.1               resolved https://github.com/angular-ui/bootstrap-bower.git#1.2.5
           bower angular#>=1.4.0                      not-cached https://github.com/angular/bower-angular.git#>=1.4.0
           bower angular#>=1.4.0                         resolve https://github.com/angular/bower-angular.git#>=1.4.0
           bower angular#>=1.4.0                        download https://github.com/angular/bower-angular/archive/v1.6.10.tar.gz
         bower ng-file-upload#~12.1.0                 resolved https://github.com/danialfarid/angular-file-upload-bower.git#12.1.0
           bower angular#>1.2.0                       not-cached https://github.com/angular/bower-angular.git#>1.2.0
           bower angular#>1.2.0                          resolve https://github.com/angular/bower-angular.git#>1.2.0
           bower angular#>1.2.0                         download https://github.com/angular/bower-angular/archive/v1.6.10.tar.gz
       bower angular-ui-notification#~0.2.0         mismatch Version declared in the json (0.1.0) is different than the resolved one (0.2.0)
           bower bootstrap#~3.3.6                        extract archive.tar.gz
           bower angular#~1.5.0                         resolved https://github.com/angular/bower-angular.git#1.5.11
           bower angular#>=1.4.0                         extract archive.tar.gz
         bower angular-ui-router#~0.2.18              resolved https://github.com/angular-ui/angular-ui-router-bower.git#0.2.18
           bower angular#>1.2.0                          extract archive.tar.gz
       bower angular-ui-notification#~0.2.0         resolved https://github.com/alexcrack/angular-ui-notification.git#0.2.0
           bower angular#>=1.4.0                        resolved https://github.com/angular/bower-angular.git#1.6.10
           bower angular#>1.2.0                         resolved https://github.com/angular/bower-angular.git#1.6.10
           bower bootstrap#~3.3.6                       resolved https://github.com/twbs/bootstrap.git#3.3.7
           bower jquery#1.9.1 - 3                     not-cached https://github.com/jquery/jquery-dist.git#1.9.1 - 3
           bower jquery#1.9.1 - 3                        resolve https://github.com/jquery/jquery-dist.git#1.9.1 - 3
           bower jquery#1.9.1 - 3                       download https://github.com/jquery/jquery-dist/archive/3.3.1.tar.gz
           bower jquery#1.9.1 - 3                        extract archive.tar.gz
           bower jquery#1.9.1 - 3                       resolved https://github.com/jquery/jquery-dist.git#3.3.1
         bower angular-resource#~1.5.0                 install angular-resource#1.5.11
         bower angular-messages#~1.5.0                 install angular-messages#1.5.11
         bower angular-animate#~1.5.0                  install angular-animate#1.5.11
         bower angular-mocks#~1.5.0                    install angular-mocks#1.5.11
     bower owasp-password-strength-test#~1.3.0     install owasp-password-strength-test#1.3.0
         bower angular-bootstrap#~1.2.1                install angular-bootstrap#1.2.5
         bower ng-file-upload#~12.1.0                  install ng-file-upload#12.1.0
           bower angular#1.5.11                          install angular#1.5.11
         bower angular-ui-router#~0.2.18               install angular-ui-router#0.2.18
       bower angular-ui-notification#~0.2.0          install angular-ui-notification#0.2.0
           bower bootstrap#~3.3.6                        install bootstrap#3.3.7
           bower jquery#1.9.1 - 3                        install jquery#3.3.1
     angular-resource#1.5.11 public/lib/angular-resource
     └── angular#1.5.11
     angular-messages#1.5.11 public/lib/angular-messages
     └── angular#1.5.11
     angular-animate#1.5.11 public/lib/angular-animate
     └── angular#1.5.11
     angular-mocks#1.5.11 public/lib/angular-mocks
     └── angular#1.5.11
     owasp-password-strength-test#1.3.0 public/lib/owasp-password-strength-test
     angular-bootstrap#1.2.5 public/lib/angular-bootstrap
     └── angular#1.5.11
     ng-file-upload#12.1.0 public/lib/ng-file-upload
     └── angular#1.5.11
     angular#1.5.11 public/lib/angular
     angular-ui-router#0.2.18 public/lib/angular-ui-router
     └── angular#1.5.11
     angular-ui-notification#0.2.0 public/lib/angular-ui-notification
     bootstrap#3.3.7 public/lib/bootstrap
     └── jquery#3.3.1
     jquery#3.3.1 public/lib/jquery
     up to date in 21.516s
-----> Caching build
     Clearing previous node cache
     Saving 2 cacheDirectories (default):
     - node_modules
     - bower_components (nothing to cache)
-----> Pruning devDependencies
     removed 198 packages in 12.367s
-----> Build succeeded!
-----> Discovering process types
     Procfile declares types -> web
-----> Compressing...
     Done: 51.7M
-----> Launching...
     Released v5
     https://shpeuf.herokuapp.com/ deployed to Heroku

APP.JS:

'use strict';
/**
 * Module dependencies.
 */
var config = require('../config'),
  mongooseService = require('./mongoose'),
  express = require('./express'),
  chalk = require('chalk'),
  seed = require('./mongo-seed');
function seedDB() {
  if (config.seedDB && config.seedDB.seed) {
    console.log(chalk.bold.red('Warning:  Database seeding is turned on'));
    seed.start();
  }
}
module.exports.init = function init(callback) {
  mongooseService.connect(function (db) {
    // Initialize Models
    mongooseService.loadModels(seedDB);
    // Initialize express
    var app = express.init(db);
    if (callback) callback(app, db, config);
  });
};
module.exports.start = function start(callback) {
  var _this = this;
  _this.init(function (app, db, config) {
    // Start the app by listening on <port> at <host>
    // app.listen(config.port, config.host, function () {
    app.listen(config.port, config.host, function () {
      // Create server URL
      var server = (process.env.NODE_ENV === 'secure' ? 'https://' : 'http://') + config.host + ':' + config.port;
      // Logging initialization
      console.log('--');
      console.log(chalk.green(config.app.title));
      console.log();
      console.log(chalk.green('Environment:     ' + process.env.NODE_ENV));
      console.log(chalk.green('Server:          ' + server));
      console.log(chalk.green('Database:        ' + config.db.uri));
      console.log(chalk.green('App version:     ' + config.meanjs.version));
      if (config.meanjs['meanjs-version'])
        console.log(chalk.green('MEAN.JS version: ' + config.meanjs['meanjs-version']));
      console.log('--');
      if (callback) callback(app, db, config);
    });
  });
};

HEROKU LOGS:

app[web.1]: npm ERR! A complete log of this run can be found in:
app[web.1]: npm ERR!     /app/.npm/_logs/2018-05-05T00_05_31_241Z-debug.log
heroku[web.1]: Process exited with status 1
heroku[web.1]: State changed from starting to crashed
heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=shpeuf.herokuapp.com request_id=005d2c58-9415-49f4-85f2-9fa277d4b4f8 fwd="24.250.156.66" dyno= connect= service= status=503 bytes= protocol=https
heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=shpeuf.herokuapp.com request_id=b4ec528e-903f-4157-91a7-c1546b0ad418 fwd="24.250.156.66" dyno= connect= service= status=503 bytes= protocol=https
heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=shpeuf.herokuapp.com request_id=0851fa25-7211-4fd1-8b78-729923af0d5e fwd="24.250.156.66" dyno= connect= service= status=503 bytes= protocol=https
heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=shpeuf.herokuapp.com request_id=d980ee37-68d3-4580-b1ec-1421fce8da31 fwd="24.250.156.66" dyno= connect= service= status=503 bytes= protocol=https
heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=shpeuf.herokuapp.com request_id=a12a8b93-3c88-4a6b-855f-1d5d8b2b8634 fwd="24.250.156.66" dyno= connect= service= status=503 bytes= protocol=https
heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=shpeuf.herokuapp.com request_id=5a19c97c-fb99-4456-bb26-d3e1f25691ce fwd="24.250.156.66" dyno= connect= service= status=503 bytes= protocol=https

I would appreciate any help

READ ALSO
Docker Compose throws invalid type error

Docker Compose throws invalid type error

I'm having an issue running docker composeSpecifically i'm getting this error:

287
Can I use window.localStorage in my React application?

Can I use window.localStorage in my React application?

I have a React application that allows users to select their "Favorite" items from a master/detail view

215
Bloat effect for image

Bloat effect for image

Is there any way to make the bloat effect for image? Not necessarily from the center

220
Database query API error construction

Database query API error construction

I'm working on a simple API that performs an INSERT query into a SQL database, using information supplied from a form clients would fill out on the front endI'm curious if there is a preferred way when it comes to constructing the error message regarding...

158