Support the ongoing development of Laravel.io →
Laravel Packages Mix

I'm trying to update Laravel from 5.3 to 5.4, but I get errors when compiling frontend assets. After installing laravel-mix, npm complains about missing dependencies:

npm WARN babel-loader@6.4.1 requires a peer of babel-core@^6.0.0 but none was installed.
npm WARN sass-loader@6.0.6 requires a peer of node-sass@^4.0.0 but none was installed.

Even though both babel-core and node-sass are dependencies of laravel-mix, they don't seem to get installed and I get a bunch of errors (like "Cannot find module 'babel-core'") when I run "npm run dev". If I install these dependencies manually, everything works just fine, but somehow I feel it should be enough to just install the laravel-mix package.

I can clone a fresh copy of the latest Laravel version and everything works just fine, so it must be something with my old project getting upgraded.

Could it be related to other packages in my package.json?

Last updated 3 years ago.
0

Actually I tried downgrading node to v. 6.* (I was running v. 8), and it all starts to fall into place now. Still don't know why it worked with a fresh install of Laravel...

0

Sign in to participate in this thread!

Eventy

Your banner here too?

jezzdk jezzdk Joined 12 May 2016

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.