在设备上运行时的离子运行时错误

时间:2018-05-15 13:10:20

标签: cordova ionic-framework ionic2 ionic3

我正在尝试使用ionic和cordova构建运行app。我在命令行上运行以下命令时收到错误。我也尝试更新离子和角度到最新版本仍然显示我同样的错误 离子cordova运行android。你能帮忙解决这个问题吗?以下是我的package.json文件。请看一看。

  "dependencies": {
    "@angular/animations": "5.2.9",
    "@angular/common": "5.2.9",
    "@angular/compiler": "5.2.9",
    "@angular/compiler-cli": "5.2.9",
    "@angular/core": "5.2.9",
    "@angular/forms": "5.2.9",
    "@angular/http": "5.2.9",
    "@angular/platform-browser": "5.2.9",
    "@angular/platform-browser-dynamic": "5.2.9",
    "@firebase/app": "^0.1.10",
    "@ionic-native/core": "4.5.3",
    "@ionic-native/splash-screen": "4.5.3",
    "@ionic-native/status-bar": "4.5.3",
    "@ionic/pro": "1.0.20",
    "@ionic/storage": "^2.1.3",
    "angularfire2": "^5.0.0-rc.6.0",
    "cordova-android": "~7.0.0",
    "cordova-plugin-device": "^2.0.1",
    "cordova-plugin-firebase": "^0.1.25",
    "cordova-plugin-ionic-keyboard": "^2.0.5",
    "cordova-plugin-ionic-webview": "^1.2.0",
    "cordova-plugin-splashscreen": "^5.0.2",
    "cordova-plugin-whitelist": "^1.3.3",
    "cordova-sqlite-storage": "^2.3.0",
    "firebase": "^4.13.1",
    "ionic-angular": "3.9.2",
    "ionic2-auto-complete": "^1.6.2-alpha",
    "ionicons": "3.0.0",
    "rxjs": "5.5.7",
    "sw-toolbox": "3.6.0",
    "upstox": "^1.2.3",
    "zone.js": "0.8.20"
  },
  "devDependencies": {
    "@ionic/app-scripts": "3.1.8",
    "typescript": "~2.6.2"
  },
  "description": "An Ionic project",
  "cordova": {
    "plugins": {
      "cordova-plugin-firebase": {},
      "cordova-sqlite-storage": {},
      "cordova-plugin-whitelist": {},
      "cordova-plugin-device": {},
      "cordova-plugin-splashscreen": {},
      "cordova-plugin-ionic-webview": {},
      "cordova-plugin-ionic-keyboard": {}
    },
    "platforms": [
      "android"
    ]
  }
}

*强调文字*

&#13 ;

   Cannot find module 'path'.

       L8:      host: CompilerHost;
       L9:      oldProgram?: Program;
      L10:  }): Program?
 Error: Failed to transpile program
    at BuildError.Error (native)
    at new BuildError (F:\Ionic apps\cricket\node_modules\@ionic\app-scripts\dis
t\util\errors.js:16:2   Cannot find module 'path'.

       L8:      host: CompilerHost;
       L9:      oldProgram?: Program;
      L10:  }): Program?
 Error: Failed to transpile program
    at BuildError.Error (native)
    at new BuildError (F:\Ionic apps\cricket\node_modules\@ionic\app-scripts\dis
t\util\errors.js:16:28)
    at F:\Ionic apps\cricket\node_modules\@ionic\app-scripts\dist\transpile.js:1
59:20
    at transpileWorker (F:\Ionic apps\cricket\node_modules\@ionic\app-scripts\di
st\transpile.js:107:12)
    at Object.transpile (F:\Ionic apps\cricket\node_modules\@ionic\app-scripts\d
ist\transpile.js:64:12)
    at F:\Ionic apps\cricket\node_modules\@ionic\app-scripts\dist\build.js:109:8
2`8)
    at F:\Ionic apps\cricket\node_modules\@ionic\app-scripts\dist\transpile.js:1
59:20
    at transpileWorker (F:\Ionic apps\cricket\node_modules\@ionic\app-scripts\di
st\transpile.js:107:12)
    at Object.transpile (F:\Ionic apps\cricket\node_modules\@ionic\app-scripts\d
ist\transpile.js:64:12)
    at F:\Ionic apps\cricket\node_modules\@ionic\app-scripts\dist\build.js:109:8
2`




0 个答案:

没有答案