'Laravel Mix Error Using version() and copyDirectory()

I am having a problem using copyDirectory() with version() on laravel mix.

let mix = require('laravel-mix'),

mix.copyDirectory('node_modules/bootstrap', 'public/vendor/bootstrap')
.sass('resources/assets/sass/style.scss', 'public/css')
.version();

Is there any other way to do this?



Solution 1:[1]

let mix = require('laravel-mix'),

mix.setPublicPath(path.resolve('./'))
    .copyDirectory('node_modules/bootstrap', 'public/vendor/bootstrap')
    .sass('resources/assets/sass/style.scss', 'public/css')
    .version();

This should resolve the issues, if not I am unsure on what it could be. maybe your mix manifest

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Michael Mano