Reputation: 171
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.
Upvotes: 2
Views: 26027
Reputation: 49
Run following commands in terminal.
npm install laravel-mix@latest
npm run dev
Upvotes: 0
Reputation: 594
In App\Providers\AppServiceProvider.php:
public function register()
{
/**
* Set the public path.
*/
$this->app->bind('path.public', function() {
return 'public path';
});
}
Upvotes: 0
Reputation: 320
I think it's because you separated your laravel files from public folder.
and public_path()
returns wrong path.
for being sure try dd(public_path())
.
If that was wrong, you have to correct paths in your index.php file and add this code:
$app->bind('path.public', function() {
return __DIR__;
});
I had the same issue and found that the problem is this.
Maybe it's late to answer this question but it may help others.
Upvotes: 5
Reputation: 1118
Ok so most here are giving solutions but they don't explain it, basically best practice if you are using a shared hosting for Laravel you put the project folder outside public_html then contents inside public you put them in public_html.
So what you need to do is don't delete the public folder in your project root and only put the
mix-manifest.json
file in the public folder that is in the root of your project, that will solve this issue
Upvotes: 0
Reputation: 989
You should create a symlink of storage/app/public
php artisan storage:link
Upvotes: 0
Reputation: 533
Maybe it will be useful for someone, when I try to visit this URL example.com/nova/login
I find this error
The Mix manifest does not exist.
(View: example/nova/resources/views/auth/layout.blade.php)
In my case executing next command was wrong:
npm run production
npm run dev
php artisan vendor:publish --provider="Laravel\Horizon\HorizonServiceProvider"
etc.
I just forgot to install Nova library after I has recovered project, php artisan nova:install
Upvotes: 1
Reputation: 1315
I had the same error. This resolved it for me. npm run production
I tried npm run dev
but it never created the manifest.js
.
Upvotes: 2
Reputation: 135
if you dont have node_modules
folder, run npm install
and then run npm run dev
.
mix()
helper function by default looks for the manifest json file in directory /public/manifest-json.js
. check this file to exist.
Upvotes: 2