找不到模块“。” --prod --relase建立在ionic 3之后

时间:2019-08-22 13:24:44

标签: angular ionic-framework ionic2 ionic3 ionic4

我正在尝试制作产品,但出现此错误

Cannot find module "."
    at vendor.js:1
    at vendor.js:1
    at Object.<anonymous> (vendor.js:1)
    at e (vendor.js:1)
    at Object.322 (main.js:1)
    at e (vendor.js:1)
    at window.webpackJsonp (vendor.js:1)
    at main.js:1

screen:1 Failed to load resource: the server responded with a status of 404 (Not Found)

Error while trying to use the following icon from the Manifest: http://localhost:8000/assets/imgs/logo.png (Resource size is not correct - typo in the Manifest?)

经过研究后,我发现3.2.3的类型脚本可能是导致这种情况的原因,我应该将其降级为typescript@2.7.2,但是当我将其降级时,会出现此错误

The Angular Compiler requires TypeScript >=3.1.1 and <3.3.0 but 2.7.2 was found instead

我已经尝试了所有方法,但无法解决此问题

我的Package.json是

{
  "name": "HelloWorld",
  "version": "0.0.1",
  "author": "Ionic Framework",
  "homepage": "http://ionicframework.com/",
  "private": true,
  "scripts": {
    "start": "ionic-app-scripts serve",
    "clean": "ionic-app-scripts clean",
    "build": "ionic-app-scripts build",
    "lint": "ionic-app-scripts lint"
  },
  "dependencies": {
    "@angular/animations": "7.2.2",
    "@angular/common": "7.2.2",
    "@angular/compiler": "7.2.2",
    "@angular/compiler-cli": "^7.2.12",
    "@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",
    "@ionic-native/base64": "^5.3.0",
    "@ionic-native/core": "~5.0.0",
    "@ionic-native/http": "^5.2.0",
    "@ionic-native/screen-orientation": "^5.3.0",
    "@ionic-native/splash-screen": "~5.3.0",
    "@ionic-native/status-bar": "~5.3.0",
    "@ionic/storage": "2.2.0",
    "@types/html2canvas": "0.0.35",
    "@types/lodash": "^4.14.122",
    "angular2-color-picker": "^1.3.1",
    "angular2-draggable": "^2.2.1",
    "angular2-uuid": "^1.1.1",
    "com-badrit-base64": "0.2.0",
    "cordova-android": "^8.0.0",
    "cordova-browser": "5.0.4",
    "cordova-plugin-screen-orientation": "^3.0.1",
    "es6-promise-plugin": "^4.2.2",
    "html2canvas": "^1.0.0-alpha.12",
    "ionic-angular": "3.9.2",
    "ionic-long-press": "^1.5.0",
    "ionicons": "4.5.5",
    "lodash": "^4.17.11",
    "mobx": "^5.0.3",
    "mobx-angular": "^3.0.1",
    "ng-socket-io": "^0.2.4",
    "ngx-color-picker": "^7.3.1",
    "rxjs": "6.0.0",
    "rxjs-compat": "^6.2.1",
    "sw-toolbox": "3.6.0",
    "zone.js": "0.8.26"
  },
  "devDependencies": {
    "@ionic/app-scripts": "^3.2.3",
    "@ionic/cli-plugin-cordova": "1.6.2",
    "@ionic/cli-plugin-ionic-angular": "1.4.1",
    "@types/node": "~8.9.4",
    "cordova-plugin-advanced-http": "2.0.5",
    "cordova-plugin-device": "2.0.2",
    "cordova-plugin-ionic-keyboard": "^2.0.5",
    "cordova-plugin-ionic-webview": "^2.0.0",
    "cordova-plugin-splashscreen": "5.0.2",
    "cordova-plugin-statusbar": "2.4.2",
    "cordova-plugin-whitelist": "1.3.3",
    "ts-node": "~5.0.1",
    "typescript": "^3.1.1"
  },
  "description": "An Ionic project",
  "cordova": {
    "plugins": {
      "cordova-plugin-screen-orientation": {},
      "cordova-plugin-whitelist": {},
      "cordova-plugin-statusbar": {},
      "cordova-plugin-device": {},
      "cordova-plugin-splashscreen": {},
      "cordova-plugin-ionic-webview": {
        "ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
      },
      "cordova-plugin-ionic-keyboard": {},
      "cordova-plugin-advanced-http": {}
    },
    "platforms": [
      "android",
      "browser"
    ]
  }
}

任何帮助将不胜感激。

0 个答案:

没有答案