如何运行五年内从未更新过的离子应用程序

问题描述 投票:0回答:1

上周我的小队给了我一个艰巨的任务。 运行 5 年前使用 ionic Angular 创建的应用程序,

问题是给定的项目五年内从未更新过。 我不知道如何运行这个应用程序,因为我尝试的一切都以任何方式失败了

{
  "name": "appname",
  "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": "^7.2.2",
    "@angular/core": "^7.2.2",
    "@angular/forms": "^7.2.2",
    "@angular/http": "^7.2.2",
    "@angular/platform-browser": "^7.2.2",
    "@angular/platform-browser-dynamic": "^7.2.2",
    "@angular/router": "^7.2.2",
    "@ionic-native/camera": "^5.5.1",
    "@ionic-native/core": "^5.10.0",
    "@ionic-native/device": "^5.5.1",
    "@ionic-native/fcm": "^5.15.1",
    "@ionic-native/file": "^5.10.0",
    "@ionic-native/file-path": "^5.5.1",
    "@ionic-native/file-transfer": "^5.10.0",
    "@ionic-native/geolocation": "^5.5.1",
    "@ionic-native/in-app-browser": "^5.5.1",
    "@ionic-native/native-page-transitions": "^5.12.0",
    "@ionic-native/network": "^5.5.1",
    "@ionic-native/qr-scanner": "^5.5.1",
    "@ionic-native/splash-screen": "^5.0.0",
    "@ionic-native/sqlite": "^5.5.1",
    "@ionic-native/status-bar": "^5.0.0",
    "@ionic-native/transfer": "^3.14.0",
    "@ionic/angular": "^4.11.10",
    "cordova": "^8.1.0",
    "cordova-android": "^7.1.4",
    "cordova-browser": "6.0.0",
    "cordova-ios": "^4.5.5",
    "cordova-plugin-add-swift-support": "^2.0.2",
    "cordova-plugin-camera": "4.0.3",
    "cordova-plugin-device": "2.0.2",
    "cordova-plugin-file": "6.0.1",
    "cordova-plugin-file-transfer": "1.7.1",
    "cordova-plugin-filepath": "1.5.4",
    "cordova-plugin-geolocation": "4.0.1",
    "cordova-plugin-inappbrowser": "3.0.0",
    "cordova-plugin-ionic": "^5.4.0",
    "cordova-plugin-ionic-keyboard": "^2.1.3",
    "cordova-plugin-ionic-webview": "^4.0.1",
    "cordova-plugin-network-information": "2.0.1",
    "cordova-plugin-qrscanner": "3.0.1",
    "cordova-plugin-splashscreen": "^5.0.2",
    "cordova-plugin-statusbar": "^2.4.2",
    "cordova-plugin-whitelist": "^1.3.3",
    "cordova-sqlite-storage": "3.2.0",
    "core-js": "^2.5.4",
    "ionic": "^4.2.1",
    "rxjs": "^6.5.2",
    "rxjs-compat": "^6.5.2",
    "sass": "^1.66.1",
    "transfer": "1.0.7",
    "ts-md5": "^1.2.4",
    "tslib": "^1.9.0",
    "zone.js": "~0.8.29"
  },
  "devDependencies": {
    "@angular-devkit/architect": "~0.13.8",
    "@angular-devkit/build-angular": "^0.13.9",
    "@angular-devkit/core": "~7.3.8",
    "@angular-devkit/schematics": "~7.3.8",
    "@angular/cli": "7.3.9",
    "@angular/compiler": "~7.2.2",
    "@angular/compiler-cli": "~7.2.2",
    "@angular/language-service": "~7.2.2",
    "@ionic/angular-toolkit": "~1.5.1",
    "@ionic/app-scripts": "^3.2.4",
    "@types/jasmine": "~2.8.8",
    "@types/jasminewd2": "~2.0.3",
    "@types/node": "~12.0.0",
    "codelyzer": "~4.5.0",
    "jasmine-core": "~2.99.1",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~4.1.0",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "~2.0.1",
    "karma-jasmine": "~1.1.2",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "~5.4.0",
    "ts-node": "~8.1.0",
    "tslint": "~5.16.0",
    "typescript": "~3.1.6"
  },
  "description": "An Ionic project",
  "cordova": {
    "plugins": {
      "cordova-plugin-camera": {},
      "cordova-plugin-device": {},
      "cordova-plugin-file": {},
      "cordova-plugin-filepath": {},
      "cordova-plugin-geolocation": {},
      "cordova-plugin-network-information": {},
      "cordova-plugin-qrscanner": {},
      "cordova-sqlite-storage": {},
      "cordova-plugin-whitelist": {},
      "cordova-plugin-statusbar": {},
      "cordova-plugin-splashscreen": {},
      "cordova-plugin-ionic-webview": {
        "ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
      },
      "cordova-plugin-ionic-keyboard": {},
      "cordova-plugin-file-transfer": {},
      "cordova-plugin-inappbrowser": {},
      "cordova-plugin-ionic": {
        "APP_ID": "1ce2ba10",
        "CHANNEL_NAME": "Master",
        "UPDATE_METHOD": "background",
        "UPDATE_API": "https://api.ionicjs.com",
        "MAX_STORE": "2",
        "MIN_BACKGROUND_DURATION": "30"
      },
      "cordova-plugin-fcm-with-dependecy-updated": {
        "FCM_CORE_VERSION": "16.0.9",
        "FCM_VERSION": "18.0.0",
        "GRADLE_TOOLS_VERSION": "3.5.0",
        "GOOGLE_SERVICES_VERSION": "4.2.0"
      },
      "cordova-plugin-fcm": {}
    },
    "platforms": [
      "browser",
      "android"
    ]
  }
}

有人可以帮助我吗? 我应该运行这个应用程序的哪个版本的 ionic、node 等? 我对 ionic 的开发有最起码的了解。

cordova ionic-framework ionic4
1个回答
0
投票

您需要做很多作业,这对于新人来说并不容易。没有如何构建/运行旧离子项目的指南。以下是一些入门步骤:

  • 项目基于 ionic 4,您需要查看 ionic github 存储库以获取 ionic 4 版本并检查最低节点和 npm 要求。
  • 了解了上述内容后,现在您需要 nvm、n 或 homebrew 来切换回那些旧版本的 Node 和 npm。因为新版本不适用于旧项目。
  • 然后尝试构建/运行项目:
    • npm i
    • ionic build
    • ionic cordova build [platform]
    • ionic cordova run [platform]

许多错误将表明需要修复,但至少你已经掌握了基础知识。祝你好运!

© www.soinside.com 2019 - 2024. All rights reserved.