cgross / generator-cg-angular

Yeoman generator for Enterprise Angular projects.
MIT License
592 stars 198 forks source link

Less not found in production #110

Open mikehm opened 9 years ago

mikehm commented 9 years ago

My css is broken when I deploy my app to the production site. This is the error I am getting:

mysiteurl/app.less 404 (Not Found) .

Its weird however, when I deploy the app on github I don't have this problem.

I tried to find solutions elsewhere but to no avail. Let me know what could be causing this please.

Thanks.

martin-s commented 9 years ago

It's obviously not found :-) You can make the build verbose with "grunt build --verbose --stack".

mikehm commented 9 years ago

This is what the console gave me after making the build verbose:

Running "less" task

Running "less:production" (less) task Verifying property less.production exists in config...OK

Files: app.less -> temp/app.css Options: (none) Reading app.less...OK Writing temp/app.css...OK File temp/app.css created.

Still not sure why app.less is missing and the css is broken.

mikehm commented 9 years ago

Do you need to install less on the production server?

cgross commented 9 years ago

The grunt build will compile all the less into css. When you build, it should create a fully optimized build int the /dist directory. There should be no references left to any less files in that optimized build. Either something is going wrong during the build or you're not deploying the correct thing.

mikehm commented 9 years ago

Thanks resolved. It was a deployment error.