i have .gitignore files, don't know if problem copied chrome console, app deployed on heroku when open browser shows empty white page, following error getting, missing?? included app.js file.
uncaught syntaxerror: unexpected token < angular.min.js:1 angular-route.min.js:7 uncaught typeerror: cannot read property 'module' of undefined @ angular-route.min.js:7 @ angular-route.min.js:13 angular-sanitize.min.js:10 uncaught typeerror: cannot read property '$$minerr' of undefined @ angular-sanitize.min.js:10 @ angular-sanitize.min.js:14 ui-bootstrap-custom-0.12.0.min.js:8 uncaught referenceerror: angular not defined @ ui-bootstrap-custom-0.12.0.min.js:8 ui-bootstrap-custom-tpls-0.12.0.min.js:8 uncaught referenceerror: angular not defined @ ui-bootstrap-custom-tpls-0.12.0.min.js:8 bookface.min.js:1 uncaught referenceerror: angular not defined @ bookface.min.js:1 @ bookface.min.js:1 ____________________________________________________________________ require('dotenv').load(); var express = require('express'); var path = require('path'); var favicon = require('serve-favicon'); var logger = require('morgan'); var cookieparser = require('cookie-parser'); var bodyparser = require('body-parser'); var passport = require('passport'); require('./app_api/models/db'); var uglifyjs = require("uglify-js"); var fs = require('fs'); require('./app_api/config/passport'); var routes = require('./app_server/routes/index'); var routesapi = require('./app_api/routes/index'); //var users = require('./app_server/routes/users'); var app = express(); // view engine setup app.set('views', path.join(__dirname,'app_server', 'views')); app.set('view engine', 'jade'); //uglifing , saving new file. var appclientfiles = [ 'app_client/app.js', 'app_client/home/home.controller.js', 'app_client/about/about.controller.js', 'app_client/auth/login/login.controller.js', 'app_client/auth/register/register.controller.js', 'app_client/bookdetail/bookdetail.controller.js', 'app_client/reviewmodal/reviewmodal.controller.js', 'app_client/common/services/authentication.service.js', 'app_client/common/services/bookfacedata.service.js', 'app_client/common/filters/addhtmllinebreaks.filter.js', 'app_client/common/directives/ratingstars/ratingstars.directive.js', 'app_client/common/directives/navigation/navigation.controller.js', 'app_client/common/directives/navigation/navigation.directive.js', 'app_client/common/directives/footergeneric/footergeneric.directive.js', 'app_client/common/directives/pageheader/pageheader.directive.js' ]; var uglified = uglifyjs.minify(appclientfiles, { compress : false }); fs.writefile('public/angular/bookface.min.js', uglified.code, function (err){ if(err) { console.log(err); } else { console.log("script generated , saved:", 'bookface.min.js'); } }); // uncomment after placing favicon in /public app.use(favicon(path.join(__dirname, 'public', 'favicon.ico'))); app.use(logger('dev')); app.use(bodyparser.json()); app.use(bodyparser.urlencoded({ extended: false })); app.use(cookieparser()); app.use(express.static(path.join(__dirname, 'public'))); app.use(express.static(path.join(__dirname, 'app_client'))); app.use(passport.initialize()); //app.use('/', routes); app.use('/api',routesapi); app.use(function(req, res) { res.sendfile(path.join(__dirname, 'app_client', 'index.html')); }); // catch 404 , forward error handler app.use(function(req, res, next) { var err = new error('not found'); err.status = 404; next(err); }); // error handlers // catch unauthorised errors app.use(function (err, req, res, next) { if (err.name === 'unauthorizederror') { res.status(401); res.json({"message" : err.name + ": " + err.message}); } }); // error handler app.use(function(err, req, res, next) { // set locals, providing error in development res.locals.message = err.message; res.locals.error = req.app.get('env') === 'development' ? err : {}; // render error page res.status(err.status || 500); res.render('error'); }); module.exports = app;
Comments
Post a Comment