Skip to content

Cannot find module 'webpack/lib/RuleSet' #1586

Closed
@Sebi2020

Description

@Sebi2020

Version

15.7.1

Steps to reproduce

  1. Install webpack globally

  2. Install vue-loader locally (webpack does not respect global vue-loader installs)

  3. Create a webpack.js.config like this:

const VueLoaderPlugin = require('vue-loader/lib/plugin')

module.exports = {
	entry: './main.js',
	mode: 'development',
	module: {
		rules: [
			{
			test: /\.vue$/,
			loader: 'vue-loader'
			}
		]
	},
	plugins: [
		new VueLoaderPlugin()
	]
}
  1. Create an entry point (main.js in code snippet)
  2. Run npx webpack

What is expected?

Correct module imports

What is actually happening?

Wrong import paths are used

Cannot find module 'webpack/lib/RuleSet

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions