For my admin panel I extract all the assets including the manifest-json.js
to mix.setPublicPath(path.normalize(\'public/backend/\'))
.
All t
i solved my problem running this command
npm install
and then
npm run production
Thank You.
I found new solution
The problem is mix manifest right? So just redirect to the mix manifest feature. for example, you have:
{{ style(mix('css/backend.css')) }}
just change your code into
{{ style('css/backend.css') }}
it works for me
In a shared hosting environment, Remove the mix e.g. {!! script(mix('js/manifest.js')) !!}
should be changed to
{!! script('js/manifest.js') !!}
This actually works for me
I had the issue on a shared host, where I was not able to run npm commands. Then I used the simplest way. In the /vendor/laravel/.../Foundation/Mix.php replace
i$manifests[$manifestPath] = json_decode(file_get_contents($manifestPath), true);
to
$manifests[$manifestPath] = json_decode(file_get_contents('https://your-domain.com/mix-manifest.json'), true);
Not recommended, but it works. You can use it as your last try.
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:
<link rel="stylesheet" href="{{ mix('css/app.css', 'app') }}">
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.
i have same problem as questioner: manifest does not exist
for solving it what i have done is ran 2 commands as following:
npm install
and then
npm run dev
and the error is solved now. yippi.