【问题标题】:Cannot find module “@angular/animations for Ionic 3找不到模块“@angular/animations for Ionic 3
【发布时间】:2018-04-23 14:07:57
【问题描述】:

我已为我的应用程序添加了此日历 (https://market.ionic.io/themes/ionic-calendar-week),但出现了一些错误 如何解决它, 这是我的 我尝试安装但不工作npm install @angular/animations@latest --save

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/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"
    ]
  }
}

错误

运行时错误找不到模块“@angular/animations”堆栈错误: 找不到模块“@angular/animations” 在对象。 (http://localhost:8100/build/vendor.js:132377:7) 在 webpack_require (http://localhost:8100/build/vendor.js:55:30) 在 Object.356 (http://localhost:8100/build/main.js:1179:95) 在 webpack_require (http://localhost:8100/build/vendor.js:55:30) 在 Object.337 (http://localhost:8100/build/main.js:1159:70) 在 webpack_require (http://localhost:8100/build/vendor.js:55:30) 在 webpackJsonpCallback (http://localhost:8100/build/vendor.js:26:23) 在http://localhost:8100/build/main.js:1:1

【问题讨论】:

  • 看起来像一个错字,但你在依赖项下 @angular/animations 前面缺少双代码,它应该是 "dependencies": { "@angular/animations": "^5.0.1"
  • 先生,我 5 次尝试将其安装到 npm install @angular/animations@latest --save 已准备好安装但未显示“依赖项”:{“@angular/animations”:“^5.0.1”`
  • 这意味着你的包没有正确安装,如果安装时出现一些错误,请检查命令行
  • @jitender 先生现在它的工作:D 我重新安装了npm install ionic 并且在再次安装之后npm install @angular/animations@latest --save

标签: angularjs ionic-framework


【解决方案1】:

现在我重新安装了它的工作 npm install ionic 并在再次安装后 npm install @angular/animations@latest --save

【讨论】:

    猜你喜欢
    • 2018-02-16
    • 2018-10-08
    • 2019-04-01
    • 1970-01-01
    • 2019-02-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多