webpack-contrib / install-webpack-plugin

Speed up development by automatically installing & saving dependencies with Webpack.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

webpack v5 compatibility

crobinson42 opened this issue · comments

I am getting this error in the console when running my webpack config:

[webpack-cli] TypeError: compiler.plugin is not a function
at NpmInstallPlugin.apply (/Users/projcts/react-tasks/node_modules/npm-install-webpack-plugin/src/plugin.js:42:12)
at createCompiler (/Users/projcts/react-tasks/node_modules/webpack/lib/webpack.js:69:12)
at create (/Users/projcts/react-tasks/node_modules/webpack/lib/webpack.js:113:15)
at webpack (/Users/projcts/react-tasks/node_modules/webpack/lib/webpack.js:121:46)
at f (/Users/projcts/react-tasks/node_modules/webpack/lib/index.js:37:15)
at WebpackCLI.createCompiler (/Users/projcts/react-tasks/node_modules/webpack-cli/lib/webpack-cli.js:1165:24)
at async WebpackCLI.bundleCommand (/Users/projcts/react-tasks/node_modules/webpack-cli/lib/webpack-cli.js:1292:20)
at async Command.<anonymous> (/Users/projcts/react-tasks/node_modules/webpack-cli/lib/webpack-cli.js:322:21)
at async Promise.all (index 1)
at async Command.<anonymous> (/Users/projcts/react-tasks/node_modules/webpack-cli/lib/webpack-cli.js:708:13)

I have the same Problem, using:

    "babel-eslint": "^10.1.0",
    "clean-webpack-plugin": "^3.0.0",
    "copy-webpack-plugin": "^7.0.0",
    "dotenv-webpack": "^6.0.0",
    "npm-install-webpack-plugin": "^4.0.5",
    "webpack": "^5.16.0",
    "webpack-archive-plugin": "^3.0.0",
    "webpack-cli": "^4.4.0",
    "webpack-dev-server": "^3.11.2",
    "webpack-merge": "^5.7.3",
    "webpack-node-externals": "^2.5.2"

Fixed in master