【问题标题】:ionic 5 conflict package.json离子 5 冲突 package.json
【发布时间】:2021-06-27 04:22:44
【问题描述】:

在运行 ionic serve 之后我会安装任何 Cordova 插件显示错误

[error] 错误:目标入口点“@ionic-native/device”缺少依赖项:

  • @ionic-native/core

[ng] 发生未处理的异常:目标入口点“@ionic-native/device”缺少依赖项: [ng] - @ionic-native/core [ng] 有关详细信息,请参阅“C:\Users\abc\AppData\Local\Temp\ng-LALJIx\angular-errors.log”。

[ERROR] ng 意外关闭(退出代码 127)。

    The Ionic CLI will exit. Please check any output above for error details.

离子信息:

Ionic:

   Ionic CLI                     : 6.13.1 (C:\Users\abc\AppData\Roaming\npm\node_modules\@ionic\cli)
   Ionic Framework               : @ionic/angular 5.6.3
   @angular-devkit/build-angular : 0.1102.6
   @angular-devkit/schematics    : 11.2.6
   @angular/cli                  : 11.2.6
   @ionic/angular-toolkit        : 3.1.1

Cordova:

   Cordova CLI       : 10.0.0
   Cordova Platforms : none
   Cordova Plugins   : no whitelisted plugins (1 plugins total)

Utility:

   cordova-res : 0.15.3
   native-run  : 1.3.0

System:

   Android SDK Tools : 26.1.1 (D:\android sdk\Sdk)
   NodeJS            : v14.16.0 (C:\Program Files\nodejs\node.exe)
   npm               : 6.14.11
   OS                : Windows 10

package.json

{
  "name": "flowdemo4",
  "version": "0.0.1",
  "author": "Ionic Framework",
  "homepage": "https://ionicframework.com/",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/common": "~11.2.7",
    "@angular/core": "~11.2.7",
    "@angular/forms": "~11.2.7",
    "@angular/platform-browser": "~11.2.7",
    "@angular/platform-browser-dynamic": "~11.2.7",
    "@angular/router": "~11.2.7",
    "@ionic-native/device": "^5.31.1",
    "@ionic/angular": "^5.6.3",
    "npm-check-updates": "^11.3.0",
    "rxjs": "~6.6.7",
    "tslib": "^2.1.0",
    "zone.js": "~0.11.4"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~0.1102.6",
    "@angular/cli": "~11.2.6",
    "@angular/compiler": "~11.2.7",
    "@angular/compiler-cli": "~11.2.7",
    "@angular/language-service": "~11.2.7",
    "@ionic/angular-toolkit": "3.1.1",
    "@types/jasmine": "~3.6.9",
    "@types/jasminewd2": "~2.0.8",
    "@types/node": "^14.14.37",
    "codelyzer": "^6.0.1",
    "cordova-plugin-device": "^2.0.3",
    "jasmine-core": "~3.7.1",
    "jasmine-spec-reporter": "~6.0.0",
    "karma": "~6.3.2",
    "karma-chrome-launcher": "~3.1.0",
    "karma-coverage": "~2.0.3",
    "karma-coverage-istanbul-reporter": "~3.0.3",
    "karma-jasmine": "~4.0.1",
    "karma-jasmine-html-reporter": "^1.5.4",
    "protractor": "~7.0.0",
    "ts-node": "~9.1.1",
    "tslint": "~6.1.0",
    "typescript": "~4.2.3"
  },
  "description": "An Ionic project",
  "cordova": {
    "plugins": {
      "cordova-plugin-device": {}
    }
  }
}

【问题讨论】:

    标签: angular ionic-framework ionic4 ionic-native


    【解决方案1】:

    最后我通过运行 npm install --save @ionic-native/core 安装 @ionic-native/core 依赖解决了

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-07-20
      • 2015-06-02
      • 2018-08-29
      • 2020-12-19
      相关资源
      最近更新 更多