Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The Mix manifest does not exist when it does exist

For my admin panel I extract all the assets including the manifest-json.js to mix.setPublicPath(path.normalize('public/backend/')).

All the files get correctly added to the backend folder, and the manifest-json.js file looks as follows:

{     // all correct here     "/js/vendor.js": "/js/vendor.js",     "/js/app.js": "/js/app.js",     "/css/app.css": "/css/app.css",     "/js/manifest.js": "/js/manifest.js" } 

the problem is that when using

{{ mix('backend/css/app.css') }} 

in my blade-files, it looks in public/manifest-json.js instead of looking for it in backend/manifest-json.js.

How can I make sure the right manifest-json.js file is used?

like image 613
Chris Avatar asked Jul 17 '17 21:07

Chris


1 Answers

I had same exception after deployment laravel project to server. It was working perfectly fine on localhost but after lot of research I found a solution. If you encounter this exception on server then you have to bind your public path to public_html

Just go to under the app/Providers, you will find your AppServiceProvider file and inside boot() method make the binding as below.

   $this->app->bind('path.public', function() {         return base_path().'/../public_html';     }); 
like image 162
Gvep Avatar answered Oct 03 '22 18:10

Gvep