问答详情
源自:3-4 Angular CLI之ng test

ng test测试遇到的Can not load "webpack"!问题

在执行ng test时报错,Can not load "webpack"!,TypeError: Cannot read property 'plugin' of undefined

24 07 2018 09:49:00.763:ERROR [karma]: Found 1 load error

请老师指点一下,这个问题怎么解决?谢谢

提问者:qq_珍惜青春_0 2018-07-24 09:54

个回答

  • 小狮
    2018-11-05 14:28:42

    It appears you have a much older version of the CLI (still using the package name angular-cli)

    You will want to remove that package and install the current version...

    npm uninstall angular-cli -g
    npm install @angular/cli -g