Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Webpack Cannot find module 'loader-utils'?

Tags:

webpack

I have imported my css file to main.js which is the entry file for webpack.

require('../css/main.css');

And I installed style&css loaders.

module: {
    loaders: [
        {test: /\.css$/, loader: "style!css"}
    ]
},

style-loader and webpack already have loader-utils package under their node_modules folder but it still cant find this module?

ERROR in Cannot find module 'loader-utils' @ ./public/css/main.css 4:14-78
like image 731
Emre Tekince Avatar asked Jun 12 '26 13:06

Emre Tekince


1 Answers

Just do npm i loader-utils. That's what worked for me.

like image 192
Syed Hammad Avatar answered Jun 18 '26 01:06

Syed Hammad