The Mix Manifest Does Not Exist Laravel

Websolutionstuff | Oct-28-2022 | Categories : Laravel

In this article, we will see the mix manifest does not exist in laravel 8 and laravel 9. We will solve the mix manifest that does not exist in laravel. Laravel mix helper by default looks for manifest-json file. So, if your file is in any other directory or this file doesn't exist then you will see the mix manifest does not exist error.

Laravel Mix, a package developed by Laracasts creator Jeffrey Way, provides a fluent API for defining webpack build steps for your Laravel application using several common CSS and JavaScript pre-processors. The mix is a thin layer on top of webpack for the rest of us. It exposes a simple, fluent API for dynamically constructing your webpack configuration.

So, let's see the mix manifest does not exist in laravel 8 and laravel 9.

Solution 1:

Do not use mix in your blade files and you can change

<link rel="stylesheet" href="{{  mix('css/app.css')  }}">

To

<link rel="stylesheet" href="{{  asset('css/app.css')  }}">

 

Solution 2:

The mix() helper function default looks for the manifest-json file in /public/manifest-json.js. So, if you can store files in any other file directory then it will show the error. The manifest-json file is stored in the public/app/manifest-json.js, then for a file located in public/app/css/app.css.

<link rel="stylesheet" href="{{ mix('css/app.css', 'app') }}">

The mix() helper function allows the second parameter to specify the manifest file directory name.

 

 

Solution 3:

In localhost, it works fine but if you can deploy it on the server you can get the same error.

If you don't have access to the root or server. You can edit the App\Providers\AppServiceProvider file and add the following code to the boot() method.

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

 

Solution 4:

If you have server or root access then you can install the MIX package using the below NPM command.

npm install
npm run dev

OR

npm run production

 


You might also like:

Recommended Post
Featured Post
How to Create New Component in Angular 17 using Command
How to Create New Component in...

Welcome to this comprehensive tutorial where I'll guide you through the process of creating a new component in Angul...

Read More

Mar-22-2024

How To Backup Database In Laravel 9 Using Spatie
How To Backup Database In Lara...

In this article, we will see how to back up the database in laravel 9 using spatie. Here, we will learn automatic&n...

Read More

Feb-08-2023

How To Import CSV File In MySQL Using Node.js
How To Import CSV File In MySQ...

In this tutorial we will see how to import CSV file in MySQL using Node.js. Import and export CSV/EXCEL file in Nod...

Read More

Jul-30-2021

How to Use Bitmasks for Efficient Data Filtering?
How to Use Bitmasks for Effici...

Data filtering might not sound like the most thrilling topic, but when it comes to processing large volumes of informati...

Read More

Oct-25-2023