Zemke / starter-laravel-angular

Laravel and AngularJS Starter Application Boilerplate featuring Laravel 5.3 and AngularJS 1.5.8
https://starter-laravel-angular.herokuapp.com
Other
369 stars 119 forks source link

file_get_contents(/app/public/build/rev-manifest.json): failed to open stream: No such file or directory (View: /app/resources/views/layout.blade.php) #33

Closed jonaths closed 8 years ago

jonaths commented 8 years ago

Hi. I am trying to upload this starter to heroku, and I get this error:

file_get_contents(/app/public/build/rev-manifest.json): failed to open stream: No such file or directory (View: /app/resources/views/layout.blade.php)

The program works well offline on Homestead, but when I push the changes to Heroku this error appears. You can check it out at https://dry-lake-8666.herokuapp.com/.

This is the gulpfile.js

var elixir = require('laravel-elixir');

/* -------------------------------------------------------------------------- Elixir Asset Management
Elixir provides a clean, fluent API for defining some basic Gulp tasks
for your Laravel application. By default, we are compiling the Less
file for our application, as well as publishing vendor resources.

*/

elixir(function (mix) { mix .less( 'app.less' ) .styles([ 'style.css' ]) .scripts([ 'libs/*/.js', 'app.js', 'appRoutes.js', 'controllers/*/_.js', 'services/_/.js', 'directives//.js' ]) .version([ 'public/css/all.css', 'public/js/all.js' ]) .copy( 'public/js/all.js.map', 'public/build/js/all.js.map' ) .copy( 'public/css/all.css.map', 'public/build/css/all.css.map' ); });

And this are the contents of rev-manifest.json:

{ "css/all.css": "css/all-dd351c50bd.css", "js/all.js": "js/all-ee8c46d8d5.js" }

Do you know how can I fix it?

jonaths commented 8 years ago

Ok.. I know what was going on. I was not pushing the public/build directory where the json file was. I commented it from the .gitignore and now it works.

jonaths commented 8 years ago

Now I have another issue. My CSS files are not working on the heroku version but they do work within Homestead. Seems like the styles come from less files and there are no less files on Heroku. Do you have any idea please?

Zemke commented 8 years ago

Hey!

I have added a Heroku deployment manual to README.md. If you happen to have any problems with the manual, please report back.