0

I'm following a Laracast tutorial, episode 6, and I reached the part where the instructor uses <link rel="stylesheet" href="{{ elixir('css/app.css') }}"/> too call the CSS file, but whenever I do this, the following error is thrown:

ErrorException in helpers.php line 341:

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

I've followed everything from the beginning, but I'm stuck at it.

2 Answers 2

1

I had the same problem, posted it on the Laracasts forum and the user Moharrum responded with this fix:

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

    elixir(function(mix) {
        mix.sass('app.scss')
            .version([
                'public/css/app.css'
            ]);
    });

It works because when you use elixir helper to reference the asset, it searches the latest version of the file, so you have to include the version tag to make it available.

https://laracasts.com/discuss/channels/elixir/elixir-gulp-rev-manifestjson-not-generated

Sign up to request clarification or add additional context in comments.

Comments

1

You should make sure you have /home/gabriel/Documents/Rxe/public/build/rev-manifest.json created. If not, make sure you have in your gulpfile.js file something like this :

elixir(function(mix) {
    mix.version('css/app.css');
});

and make sure, you've run gulp in order to run elixir and generate rev-manifest.json file.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.