Comments (16)
I think this can be fixed by using ngmin?
from mean.
Did you make sure to build your files into the minified versions using grunt build?
from mean.
It's the same issue that I have. For some reason the grunt task for minifying the CSS and JS files is not working. Unfortunately I couldn't find why this happens.
from mean.
Hey, I was able to reproduce this on my linux box:
# seems to work
NODE_ENV=production grunt
# get rid of the dist files
rm public/dist/*.*
# Now doesn't work
NODE_ENV=production grunt
In my case, the dist files were not recreated, or included in the HTML.
Here's the output from GET /
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>WriterMustWrite</title>
<!-- General META -->
<meta charset="utf-8">
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1">
<!-- Semantic META -->
<meta name="keywords" content="writer, must, write, writing, editor,
publish, publishing, ebook, pro, professional">
<meta name="description" content="Outline, write, edit and publish.
Undistracted app for professional writers.">
<!-- Facebook META -->
<meta property="fb:app_id" content="APP_ID">
<meta property="og:site_name" content="WriterMustWrite">
<meta property="og:title" content="WriterMustWrite">
<meta property="og:description" content="Outline, write, edit and publish.
Undistracted app for professional writers.">
<meta property="og:url" content="http:// localhost:3000/">
<meta property="og:image" content="/img/brand/logo.png">
<meta property="og:type" content="website">
<!-- Twitter META -->
<meta name="twitter:title" content="WriterMustWrite">
<meta name="twitter:description" content="Outline, write, edit and publish.
Undistracted app for professional writers.">
<meta name="twitter:url" content="http:// localhost:3000/">
<meta name="twitter:image" content="/img/brand/logo.png">
<!-- Fav Icon -->
<link href="/modules/core/img/brand/favicon.ico" rel="shortcut icon"
type="image/x-icon">
<!--Application CSS Files-->
<link rel="stylesheet" href="lib/bootstrap/dist/css/bootstrap.min.css">
<link rel="stylesheet"
href="lib/bootstrap/dist/css/bootstrap-theme.min.css">
<!-- HTML5 Shim -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body class="ng-cloak">
<header data-ng-include="'/modules/core/views/header.client.view.html'"
class="navbar navbar-fixed-top navbar-inverse"></header>
<section class="content">
<section class="container">
<section data-ui-view></section>
</section>
</section>
<!--Embedding The User Object-->
<script type="text/javascript">
var user = null;
</script>
<!--Application JavaScript Files-->
<script type="text/javascript" src="lib/angular/angular.min.js"></script>
<script type="text/javascript"
src="lib/angular-resource/angular-resource.min.js"></script>
<script type="text/javascript"
src="lib/angular-animate/angular-animate.min.js"></script>
<script type="text/javascript"
src="lib/angular-ui-router/release/angular-ui-router.min.js"></script>
<script type="text/javascript"
src="lib/angular-ui-utils/ui-utils.min.js"></script>
<script type="text/javascript"
src="lib/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
</body>
</html>
On Thu, May 15, 2014 at 6:09 AM, darksniper87 [email protected]:
It's the same issue that I have. For some reason the grunt task for
minifying the CSS and JS files is not working. Unfortunately I couldn't
find why this happens.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/64#issuecomment-43197135
.
Michael Cole
http://Powma.com
(512) 333-4372
from mean.
The build task is a separate task before running your application in a production environment you should first run: grunt build, this will minify and recreate the minified application files so you should test your production deployment like this:
$ grunt build
$ NODE_ENV=production grunt
from mean.
Ok, yep. I'm seeing them now. Thanks!
from mean.
Hey, this means on Heroku, we'd need a special build-pack: https://github.com/mbuchetics/heroku-buildpack-nodejs-grunt
from mean.
Not at all, just make sure you build your files before deploying to heroku, using grunt in production enviornment is a mess, grunt is a development utility it is not really production capable
from mean.
I actually would like to incorporate a heroku deploy task
from mean.
Ok, I saw a pull request about removing the dist/ files from git. If they stay in git, and get built before deployment, that'll work.
A grunt task to configure and deploy a heroku server would be pretty awesome.
from mean.
I ran grunt build. That wasnt the problem. The problem was fixed when I add the following dependency here('ui.bootstrap.tpls'):
var applicationModuleVendorDependencies = ['ngResource', 'ngCookies', 'ngAnimate', 'ngTouch', 'ngSanitize', 'ui.router', 'ui.bootstrap', 'ui.bootstrap.tpls', 'ui.utils'];
Thats why I think if we add the ngMin grunt task it would resolve the issue as well
from mean.
added ngmin in 0.3.1 thank you everyone
from mean.
I'm setting up continuous integration for my site on Heroku using codeship.
How do I make grunt build, or any equivalent regeneration of dist files, to run on every successful build?
I'd rather not run it manually on every commit.
from mean.
Hi @eshaham,
I think you can define the build task as one of the setup commands: http://blog.codeship.io/2013/10/08/how-to-deploy-a-node-js-app-from-github-to-heroku.html?utm_campaign=Q2_2014_landingpage&utm_medium=text&utm_source=tutorials
just use grunt build.
from mean.
Thanks.
It turns out you can run a custom script on codeship before or after deployment.
from mean.
I am new to MeanJS and started loving it. I still seem to have this issue.
- I created a MeanJS Project. Added a module.
- grunt lint and ran the application in development mode - Works Perfect.
- grunt build and deploy to heroku or run locally in production mode (after setting NODE_ENV=production) the module doesnt seem to be recognized.
Can someone help ?
from mean.
Related Issues (20)
- tion HOT 1
- Is MEAN.js still maintained? HOT 8
- missing apt package to install
- error when deploy to heroku
- Gulp tasks broken after upgrading to Gulp v4
- Travis CI fails on Windows build
- "npm install" fails on macOS mojave HOT 1
- npm install fails with "error: ‘class v8::Object’ has no member named ‘ForceSet’" on node-sass with node v10.15.1 HOT 5
- How is the Authentication process working in the meanjs? Where does the process flow starts when a website is loaded which file gets loaded and what are the files that are called in an orderly manner while checking authenicaton?
- Any free server available for deploy small mean stack application.
- Is MEAN.JS planning to upgrade framework with Angular2+ if yes then when it could be done if not then what about AngularJS abandaon thing?
- npm install error according the mean's doc! HOT 1
- How to connect two different databases from mongoose for the same project HOT 2
- Improving speed of MEAN Stack application HOT 1
- RPi4 ubuntu-standard default installation permission issue HOT 1
- Getting started guide using mac doesn't work HOT 2
- Getting errors on npm install and npm start on Windows HOT 5
- meanjs stack failled submit form
- meanjs stack failled submit HOT 7
- Question about Future HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mean.