[Solved] Error: Cannot find module 'webpack/lib/rules/DescriptionDataMatcherRulePlugin' Require stack:

Laravel Mohit Mozumder

Problem:

On my laravel project I have webpack-cli installed. But this is causing an error:

When I run npm run dev or npm run hot

[webpack-cli] Error: Cannot find module 'webpack/lib/rules/DescriptionDataMatcherRulePlugin'


Solution:

Update your vue-loader by this code

npm update vue-loader

And if it is not installed, install it

npm i vue-loader


Note:

Laravel is manually adding vue-loader:^15.9.7 so You have to edit your Package.json file and find vue-loader. and Replace version with 17.0.0 OR 15.10.0.

vue-loader:^17.0.0

OR

vue-loader:^15.10.0

Then run this command -

npm install 

Then

npm run dev


Thank you for reading the article. If you face any further problem feel free to ask us.