iki's avatar
Level 3

laravel mix

trying to run npm run dev and i get this error

http://prntscr.com/lwxo45

and thats my code

mix.styles([
    'public/admin/assets/vendors/base/vendors.bundle.rtl.css',
    'public/admin/assets/demo/default/base/style.bundle.rtl.css',
    'public/admin/css/style-m.css',
], 'public/css/all.css');

mix.js([
    'public/admin/assets/vendors/base/vendors.bundle.js',
    'public/admin/assets/demo/default/base/scripts.bundle.js',
    'public/admin/assets/app/js/dashboard.js',
],'public/js/all.js');
0 likes
2 replies
munazzil's avatar

You can use as like this in your app.blade.php.

<script src="{{ asset('mix.js') }}" defer></script>

<link href="{{ asset('mix.styles') }}" rel="stylesheet">
rawilk's avatar

@munazzil - Your reply has absolutely nothing to do with the question here.

@iki - webpack is unable to resolve those dependencies it has listed in the error. It seems the js scripts you are combining are referencing other scripts that are not installed. Are you sure you have those dependencies installed?

Please or to participate in this conversation.