Angular-cli: Angular CLI: 1.5.4: Cannot find module 'copy-webpack-plugin'

Created on 23 Nov 2017  路  5Comments  路  Source: angular/angular-cli

Versions

Angular CLI: 1.5.4
Node: 8.9.1
OS: darwin x64
Angular: 5.0.3
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, platform-server, router

@angular/cli: 1.5.4
@angular-devkit/build-optimizer: 0.0.33
@angular-devkit/core: 0.0.21
@angular-devkit/schematics: 0.0.37
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.8.4
@schematics/angular: 0.1.7
typescript: 2.4.2
webpack: 3.8.1

Repro steps

  • ng new app-test --style=scss --routing=true --skip-git --skip-tests --skip-git --view-encapsulation=push
  • cd app-test
  • ng build

Observed behavior

Cannot find module 'copy-webpack-plugin'
Error: Cannot find module 'copy-webpack-plugin'
    at Function.Module._resolveFilename (module.js:536:15)
    at Function.Module._load (module.js:466:25)
    at Module.require (module.js:579:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/Users/***/Developer/co/app-test/node_modules/@angular/cli/models/webpack-configs/common.js:5:27)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3)
    at Module.require (module.js:579:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/Users/***/Developer/co/app-test/node_modules/@angular/cli/models/webpack-configs/index.js:7:10)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)

Desired behavior

Should not fail.

Mention any other details that might be useful (optional)

npm install --save-dev copy-webpack-plugin
works

Most helpful comment

@osahner feels like, it was already fixed : https://github.com/webpack-contrib/copy-webpack-plugin/issues/172
But, you can fix it locally, if you add "copy-webpack-plugin": "4.2.0" to your devDependencies

All 5 comments

@osahner feels like, it was already fixed : https://github.com/webpack-contrib/copy-webpack-plugin/issues/172
But, you can fix it locally, if you add "copy-webpack-plugin": "4.2.0" to your devDependencies

It's already fixed in 4.2.3

Same issue here, thanks for your information :)

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MateenKadwaikar picture MateenKadwaikar  路  3Comments

donaldallen picture donaldallen  路  3Comments

JanStureNielsen picture JanStureNielsen  路  3Comments

rajjejosefsson picture rajjejosefsson  路  3Comments

jbeckton picture jbeckton  路  3Comments