Cannot find module angular/animations

前端 未结 6 1258
梦如初夏
梦如初夏 2021-02-12 01:44

I am using webpack in angular2 and when i try to run my app i get an error stating

Cannot find module \"@angular/animations\"

6条回答
  •  深忆病人
    2021-02-12 02:31

    I have done this steps:

    https://github.com/mgechev/angular-seed/issues/1880#issuecomment-290557768

    I'll quote:

    I had the same issue upgrading from 2.0 to 4.0. In the end I was missing the following from my systemjs.config.js:

    '@angular/animations': 'npm:@angular/animations/bundles/animations.umd.js',
    '@angular/animations/browser': 'npm:@angular/animations/bundles/animations-browser.umd.js',
    '@angular/platform-browser/animations': 'npm:@angular/platform-browser/bundles/platform-browser-animations.umd.js',

    At first I had the first and third line - everything started working once I added the second line for @angular/animations/browser.

    this worked for me and i can see fixed most of cases.

提交回复
热议问题