Cannot find module 'webpack/lib/RuleSet'
See original GitHub issueVersion
15.4.0
Reproduction link
https://www.npmjs.com/package/vue-loader/v/15.4.2
Steps to reproduce
Init a project without installing webpack locally , and run global webpack
in terminal
What is expected?
webpack build successfully
What is actually happening?
Error: Cannot find module ‘webpack/lib/RuleSet’
Due to line 2 in node_modules/vue-loader/lib/plugin.js
const RuleSet = require('webpack/lib/RuleSet')
Issue Analytics
- State:
- Created 5 years ago
- Reactions:12
- Comments:17 (2 by maintainers)
Top Results From Across the Web
node.js - Error: Cannot find module 'webpack/lib/rules ...
I had this error in my project. After searching for it, I discovered that I have to upgrade the Vue loader. And if...
Read more >[Solved] Error: Cannot find module 'webpack/lib/rules ...
To Solve Error: Cannot find module 'webpack/lib/rules/DescriptionDataMatcherRulePlugin' This error may occur Because of Vue-Loader. If you do ...
Read more >Cannot find module 'webpack/lib/RuleSet'' error-Vue.js
It sounds like you're missing webpack from your package.json, but it was previously installed. Clearing out your node_modules would also remove it. To...
Read more >Error: Cannot find module 'webpack/lib/RuleSet' - DCloud问答
uni-app,mui,nativejs,dcloud,HBuilder,HBuilderX,HTML5,流应用,数字天堂网络,数字天堂,web,前端开发,web开发,跨平台,开发工具,ide,css,javascript.
Read more >Error: Cannot find module 'webpack/lib/RuleSet'的问题解决方法
微信小程序创建好后不能正常运行,报Error: Cannot find module 'webpack/lib/RuleSet'的解决方法_1671465600.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This happens with the
next
version of Webpack (Webpack 5.0.0-rc.1)Check this https://github.com/vuejs/vue-loader/issues/1586#issuecomment-528682809 Adding
webpack
as a dev dependency resolved the issue for me.