Copy-webpack-plugin: TypeError: compilation.getCache is not a function

Created on 7 Jan 2021  Β·  8Comments  Β·  Source: webpack-contrib/copy-webpack-plugin

i install this plugin with npm in my vue project,and configured in vue.config.js.when i start the project,it told me that 'TypeError: compilation.getCache is not a function' at 'copy-webpack-plugin\dist\index.js:459:33'

Most helpful comment

Something stating "v6 of this plugin works with webpack v4" really needs to be added to the README.

All 8 comments

@Iffyyy I hit this after a fresh install npm i copy-webpack-plugin β€”Β that'll install v7 of the plugin, which requires webpack 5. I'm not using webpack 5, and resolved by npm i copy-webpack-plugin@6.

Something stating "v6 of this plugin works with webpack v4" really needs to be added to the README.

Please do not ignore messages from package manager you need webpack@5 for latest version

Hi, i'm using [email protected] and [email protected] works charmingly [email protected].
For [email protected] and [email protected] still got error compilation.getCache.

@AzrizHaziq it means you still on webpack@4, run npm ls webpack

@alexander-akait

β”œβ”€β”¬ [email protected] β”‚ └── [email protected] deduped β”œβ”€β”¬ [email protected] β”‚ └── [email protected] deduped β”œβ”€β”¬ [email protected] β”‚ └── [email protected] deduped β”œβ”€β”¬ [email protected] β”‚ └─┬ [email protected] β”‚ └─┬ [email protected] β”‚ └── [email protected] deduped β”œβ”€β”€ [email protected] └─┬ [email protected] └─┬ [email protected] └── [email protected] deduped

update webpack-cli to the 4 version

I think i mess up a little bit. I'm currently using lerna, and strangely it was using webpack@4.*.
Please ignore my previous comment πŸ˜„ .

Thanks @alexander-akait.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

RPDeshaies picture RPDeshaies  Β·  5Comments

nickenchev picture nickenchev  Β·  3Comments

cletusw picture cletusw  Β·  5Comments

ietabhi picture ietabhi  Β·  5Comments

dmarcautan picture dmarcautan  Β·  5Comments