question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

vue-loader/lib/plugin-webpack5.js is missing updated rule

See original GitHub issue

Version

16.3.0

Related link

https://github.com/webpack/webpack/commit/7f22e4721f2db6c374c0ec1ea8b9c295ac81f494

Steps to reproduce

When trying to run app with vue-loader, it breaks with unable to find DescriptionDataMatcherRulePlugin in webpack5, as it has been updated.

What is expected?

const ruleSetCompiler = new RuleSetCompiler([ 
   ...
   new ObjectMatcherRulePlugin(), 
   ...
 ]) 

What is actually happening?

const ruleSetCompiler = new RuleSetCompiler([ 
   ...
   new DescriptionDataMatcherRulePlugin(), 
   ...
 ]) 

Webpack 5 has updated the rule set.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:15
  • Comments:6

github_iconTop GitHub Comments

12reactions
Jaffsterzcommented, Aug 2, 2021

We have found this same issue after upgrading to webpack 5.48 (and vue-loader15.9.7). Downgrading to 5.47 fixed it but that’s obviously only going to be a temporary solution.

7reactions
boutellcommented, Jul 16, 2021

Yes that is exactly the problem I’m talking about. It’s happening because vue-loader is requiring these private bits of webpack, which involves making the assumption that the “project-level” install of webpack is the same as the one vue-loader is supposed to be working with. In your project and mine, it ain’t, and the sanity check falls over.

You can work around it in your project by making sure your project’s top level depends on the same version of webpack that webpacker does. Then delete package-lock.json, clear node_modules, npm install and you should get only one version of webpack, so vue-loader can’t require anything from the “wrong” one.

But long term I’m hoping these suggestions from the webpack team will lead to a more permanent resolution — always respecting that the vue-loader team no doubt knows more about this issue than I and has a great deal on their plate as well. Hopefully they will chime in. 🙏

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error after updating webpack from 5.47.1 to 5.48.0 ... - GitHub
I am a Laravel user. npm i vue-loader updated Vue-loader from 15.9.6 to 15.9.8 fixed this for me using Laravel 7.30.4 and ...
Read more >
node.js - Error: Cannot find module 'webpack/lib/rules ...
I have to manually update the vue-loader:^15.9.8 in the package JSON to solve the error. Then do yarn and yarn dev or npm...
Read more >
Cannot create new F7-Vue project - Framework7 Forum
STR: framework7 create --ui select 'Vue.js' select 'PWA' Create App ... in issue vue-loader/lib/plugin-webpack5.js is missing updated rule ...
Read more >
Getting Started - Vue Loader
For example, if you have a rule matching /\.js$/ , it will be applied to <script> blocks in .vue files. A more complete...
Read more >
Missing Persons Information - Arkansas Department of Public ...
The majority of law enforcement officials consider photographs to be the most important tool in missing person cases. There is no required waiting...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found