Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

app_dev's avatar

Mix font-awesome compile error

".copy" code error for Webpack.mix.js.


//I use

mix.js('resources/js/app.js', 'public/js')
    .sourceMaps()
    .copy('node_modules/font-awesome/fonts/', 'public/fonts')
    .sass('resources/sass/app.scss', 'public/css').version();

What I've done before;

//console
npm install font-awesome

//added in resources/assets/sass/app.scss
@import "node_modules/font-awesome/scss/font-awesome";

//in the webpack.mix file
.copy('node_modules/font-awesome/fonts', 'public/fonts');

Works for "npm run dev". Returns error for "npm run watch". "Error chokidar"

0 likes
3 replies
carltondickson's avatar

Hmmm, then I guess I'm totally wrong here.

That's quite an old version of node form what I understand but I can't see anything to suggest that chokidar or laravel mix doesn't work with older versions of node.

Do you have any more text in the error message?

I'm a little stuck with any other suggestions other than trying a newer version of node (10, 12 or 14 I think is current Long term supported version).

Please or to participate in this conversation.