The Mix manifest does not exist when it does exist

后端 未结 10 1804
醉酒成梦
醉酒成梦 2020-12-23 20:56

For my admin panel I extract all the assets including the manifest-json.js to mix.setPublicPath(path.normalize(\'public/backend/\')).

All t

相关标签:
10条回答
  • 2020-12-23 21:07

    i solved my problem running this command

    npm install
    

    and then

    npm run production
    

    Thank You.

    0 讨论(0)
  • 2020-12-23 21:11

    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

    0 讨论(0)
  • 2020-12-23 21:16

    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

    0 讨论(0)
  • 2020-12-23 21:17

    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.

    0 讨论(0)
  • 2020-12-23 21:18

    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.

    0 讨论(0)
  • 2020-12-23 21:19

    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.

    0 讨论(0)
提交回复
热议问题