raakkan's avatar

The Mix manifest does not exist

i'm created simple laravel project with this Laravel-Vue SPA starter project template and im uploaded this project to ubuntu server. all settings corect but i run this project returns this error "The Mix manifest does not exist. (View: /var/www/html/project/resources/views/index.blade.php)".

please anyone help me. i'm new in laravel.

0 likes
23 replies
topvillas's avatar

Have you run npm install and npm run production?

1 like
raakkan's avatar

Yes I'm also run this comments npm install and npm run production.

raakkan's avatar

All project files in same directory in my server

raakkan's avatar

I don't understand this answer.

The problem I faced was that the mix()-helper function by default looks for the manifest-json file in /public/manifest-json.js so if you store that file on any other directory level then it will throw that error.

Let's say the manifest-json file is stored in public/app/manifest-json.js, then for a file located in public/app/css/app.css you would use:

The mix()-helper function allows for a second argument, the directory of the manifest file. Just specify it there and it will use the correct manifest file.

And this answer what is public_html

$this->app->bind('path.public', function() { return base_path().'/../public_html'; });

My server only /var/www/html/ folders where is public_html folder

2 likes
aymen_mohammed's avatar

I faced the same problem, and i did not found any correct solution

Ossy's avatar

I fixed mine by running npm run dev

2 likes
ubfacility's avatar

how on earth did you guys run "npm run dev"? I have just been wasting my life running in useless circles on this same issue, why is it hard to find a working solution for Laravel 8?

oirrc_developer's avatar

i fixed the solution but my login page view is horrible..? how can i fix it?

lawalthb's avatar

I fixed mine using this cmd npm install laravel-mix@latest --save-dev

3 likes
 miguel's avatar

If you have NOVA, this line fixed it

php artisan nova:publish

1 like
hack4mocro's avatar

This is a permissions issue, open cmd as admin and first run --> npm install. Secondly run --> npm ci && npm run dev

SaleLaravel's avatar

this is my error : md5_file(E:\Laravel\kos-manager-master\public\mix-manifest.json): failed to open stream: No such file or directory

I only type this npm install

then run

npm run dev

moharaja's avatar

my solution was for live server (not localhost)

link rel="stylesheet" href="{{ mix('css/finder.css') }}" defer to link rel="stylesheet" href="{{ asset('css/app.css') }}" defer

and

script src="{{ mix('js/app.js') }}" defer

to

script src="{{ asset('js/app.js') }}" defer

1 like
NAfrozKakoli's avatar

You need to make the /public dir your sites document root. Like if you have a domain 'abc.xyz.com' , its document root is by default 'abc.xyz.com'. Change it to 'abc.xyz.com/public' Every mix, css, js, .htaccess , index.php missing problem will be gone.

efutures's avatar

This happened to me because laravel has changed to vite.

I has used this,

<script src="{{ mix('js/app.js') }}"></script>

But the correct command was

@vite('resources/js/app.js')
1 like
mnalbant's avatar

@efutures You are a lifesaver, this worked like a charm, I am using Laravel 10 Thank you!

Please or to participate in this conversation.