Cannot find module "@angular/animations"


#1

I’m added this calendar (https://market.ionic.io/themes/ionic-calendar-week )for my Application ,But I had some error
How to fix it ,
im try to installed thisnpm install @angular/animations@latest --save but not work
this is my
package.jason

{
  "name": "MyApp",
  "version": "0.0.1",
  "author": "Ionic Framework",
  "homepage": "http://ionicframework.com/",
  "private": true,
  "scripts": {
    "clean": "ionic-app-scripts clean",
    "build": "ionic-app-scripts build",
    "lint": "ionic-app-scripts lint",
    "ionic:build": "ionic-app-scripts build",
    "ionic:serve": "ionic-app-scripts serve"
  },
  "dependencies": {
    "@angular/animations": "^5.0.1",
    "@angular/common": "4.4.3",
    "@angular/compiler": "4.4.3",
    "@angular/compiler-cli": "4.4.3",
    "@angular/core": "4.4.3",
    "@angular/forms": "4.4.3",
    "@angular/http": "4.4.3",
    "@angular/platform-browser": "4.4.3",
    "@angular/platform-browser-dynamic": "4.4.3",
    "@ionic-native/core": "4.3.2",
    "@ionic-native/splash-screen": "4.3.2",
    "@ionic-native/status-bar": "4.3.2",
    "@ionic/storage": "2.0.1",
    "angular-percent-circle-directive": "^1.1.1",
    "angular-svg-round-progressbar": "^1.1.1",
    "cordova-android": "6.3.0",
    "cordova-plugin-device": "^1.1.4",
    "cordova-plugin-ionic-webview": "^1.1.16",
    "cordova-plugin-splashscreen": "^4.0.3",
    "cordova-plugin-whitelist": "^1.3.1",
    "ion2-calendar": "^2.1.1",
    "ionic-angular": "3.7.1",
    "ionic-plugin-keyboard": "^2.2.1",
    "ionic3-calendar": "^1.1.6",
    "ionicons": "3.0.0",
    "moment": "^2.19.1",
    "rxjs": "5.4.3",
    "sw-toolbox": "3.6.0",
    "uuid": "^3.1.0",
    "zone.js": "0.8.18"
  },
  "devDependencies": {
    "@ionic/app-scripts": "3.0.1",
    "typescript": "2.3.4"
  },
  "description": "An Ionic project",
  "cordova": {
    "plugins": {
      "ionic-plugin-keyboard": {},
      "cordova-plugin-whitelist": {},
      "cordova-plugin-device": {},
      "cordova-plugin-splashscreen": {},
      "cordova-plugin-ionic-webview": {}
    },
    "platforms": [
      "android"
    ]
  }
}

Thanks

Runtime Error
Cannot find module "@angular/animations"
Stack
Error: Cannot find module "@angular/animations"
    at Object.<anonymous> (http://localhost:8100/build/vendor.js:132377:7)
    at __webpack_require__ (http://localhost:8100/build/vendor.js:55:30)
    at Object.356 (http://localhost:8100/build/main.js:1179:95)
    at __webpack_require__ (http://localhost:8100/build/vendor.js:55:30)
    at Object.337 (http://localhost:8100/build/main.js:1159:70)
    at __webpack_require__ (http://localhost:8100/build/vendor.js:55:30)
    at webpackJsonpCallback (http://localhost:8100/build/vendor.js:26:23)
    at http://localhost:8100/build/main.js:1:1

#2

Hello,

for me it looks that animation is from new angular 5. Try replace ^5.0.1 to 4.4.3

Best regards, anna-liebt


#3

Hello,

I have imported FormsModule but still error remains same.

Should i need to import TagInputModule in component also?
i have imported in app.module but not in my component Home.Component


#4

Sir you should imports to this your app.module.ts

  imports: [
    BrowserModule,
    BrowserAnimationsModule, //BrowserAnimationsModule
    IonicModule.forRoot(MyApp),

  ],