question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The Mix manifest does not exist

See original GitHub issue
  • Laravel Mix Version: 1.6.2
  • Node Version : 8.4.0
  • NPM Version : 5.3.0
  • OS: Ubuntu 16
  • Laravel version : 5.4

Description:

I’m trying to install Laravel in a sub-directory, keeping security in mind, my directory structure is as follows

/var/www/laravel/
/var/www/html/demo/

(demo folder is where i prefer to be called as public folder. and things works like a charm except this mix issue.)

After i run npm run dev it creates mix-manifest.json in /var/www/html/demo/ directory along with css and js directories with compiled files.

in my views/auth/layout.blade.php , i have called the versioned asset like this.

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

And when i reload the page, it says

The Mix manifest does not exist.
in helpers.php (line 548)
at mix('/css/app.css')

in my /var/www/html/demo/ folder, the manifest exists.

{
    "/js/app.js": "/js/app.js?id=62141ada8b6feb788550",
    "/css/app.css": "/css/app.css?id=26d13f158c3bade2b2d3",
}

and here is my webpack.mix.js file contents

let mix = require('laravel-mix');
let path = require('path');
mix.setPublicPath(`..${path.sep}html/demo/`);
mix.js('resources/assets/js/app.js', 'js')
	.sass('resources/assets/sass/app.scss', 'css').version();
  • I can call the css file directly, (<link href="{{ asset('css/app.css') }}" rel="stylesheet">). It works, but i prefer to call with mix versioning.
  • I can call the css file <link href="{{ asset('css/app.css') }}" rel="stylesheet">. It works too. But not with mix.
  • I have tried settings the mix.setResourceRoot('../html/demo/'); and it didnt help.
  • I have tried https://stackoverflow.com/a/45154015 but it doesn’t help either (<link rel="stylesheet" href="{{ mix('css/app.css', '../html/demo') }}">)

Steps To Reproduce:

Install Laravel outside root. (/var/www/laravel) Assume example.com as the server. Create sub directory as example.com/demo/ (/var/www/html/demo) Move Files in /var/www/laravel/public folder to /var/www/html/demo

Change paths in demo/index.php

require __DIR__.'../../../laravel/bootstrap/autoload.php';
$app = require_once __DIR__.'../../../laravel/bootstrap/app.php';

Install packages with npm "laravel-mix": "^1.6.2"

Webpack.mix.js content.

let path = require('path');
mix.setPublicPath(`..${path.sep}html/demo/`);
mix.js('resources/assets/js/app.js', 'js')
	.sass('resources/assets/sass/app.scss', 'css').version();	

run npm dev

It should compile files into /var/www/html/demo folder and create mix-manifest.json file with above mentioned content.

Access example.com/demo/

It should produce the error.

Please help fix this. Thank you!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:7
  • Comments:19

github_iconTop GitHub Comments

35reactions
pfloriginalecommented, Dec 8, 2017

I solved in windows with:

Install php 7 e update older path that point older version

unistall e re-install node.js (not last 9 version that seem have a bug with npm)

Fresh laravel installation 5.5

Php artisan preset react (just this by cli)

Npm install Npm run dev

Now i can compile e use react in my laravel

23reactions
RichardStylescommented, Feb 11, 2018

Even with the package being auto discovered you need still to run. php artisan vendor:publish --provider="Laravel\Horizon\HorizonServiceProvider" Then re-run yarn dev or npm run dev

Read more comments on GitHub >

github_iconTop Results From Across the Web

The Mix manifest does not exist when it does exist
The mix () -helper function allows for a second argument, the directory of the manifest file. Just specify it there and it will...
Read more >
The Mix manifest does not exist - Laracasts
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...
Read more >
The Mix manifest does not exist · Issue #1352 - GitHub
Here is how I resolved this issue. i) install npm in your project area i.e (blog dir open cmd and then run npm...
Read more >
The Mix Manifest Does Not Exist Laravel - Medium
In this article, we will see the mix manifest does not exist in laravel 8 and laravel 9. We will solve the mix...
Read more >
The Mix Manifest Does Not Exist Laravel - Websolutionstuff
We will solve the mix manifest that does not exist in laravel. Laravel mix helper by default looks for manifest-json file. So, if...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found