错误:找不到模块“ Cordova /模块”

时间:2018-11-02 11:22:19

标签: ionic-framework ionic3 cordova-plugins

我一直在尝试开发用于与SQL Server R2008交互的ionic v3应用程序。我正在使用“ cordova-plugin-sqlserver”来处理服务器交互。

但是我一直在提供的页面中看到以下错误:

Error: Cannot find module "cordova/exec"
at webpackMissingModule (http://localhost:8100/build/main.js:93:76)
at Object.194 (http://localhost:8100/build/main.js:93:165)
at __webpack_require__ (http://localhost:8100/build/vendor.js:55:30)
at Object.193 (http://localhost:8100/build/main.js:44:103)
at __webpack_require__ (http://localhost:8100/build/vendor.js:55:30)
at Object.268 (http://localhost:8100/build/main.js:205:75)
at __webpack_require__ (http://localhost:8100/build/vendor.js:55:30)
at Object.218 (http://localhost:8100/build/main.js:143:73)
at __webpack_require__ (http://localhost:8100/build/vendor.js:55:30)
at Object.195 (http://localhost:8100/build/main.js:125:70)

我的package.json文件在下面:

{
"name": "somethingsomething",
  "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": "5.2.11",
    "@angular/common": "5.2.11",
    "@angular/compiler": "5.2.11",
    "@angular/compiler-cli": "5.2.11",
    "@angular/core": "5.2.11",
    "@angular/forms": "5.2.11",
    "@angular/http": "5.2.11",
    "@angular/platform-browser": "5.2.11",
    "@angular/platform-browser-dynamic": "5.2.11",
    "@ionic-native/core": "~4.15.0",
    "@ionic-native/splash-screen": "~4.15.0",
    "@ionic-native/status-bar": "~4.15.0",
    "@ionic/pro": "2.0.3",
    "@ionic/storage": "2.2.0",
    "cordova-android": "7.1.1",
    "cordova-plugin-device": "^2.0.2",
    "cordova-plugin-ionic-keyboard": "^2.1.3",
    "cordova-plugin-ionic-webview": "^2.2.0",
    "cordova-plugin-splashscreen": "^5.0.2",
    "cordova-plugin-sqlserver": "^1.0.0",
    "cordova-plugin-statusbar": "^2.4.2",
    "cordova-plugin-whitelist": "^1.3.3",
    "ionic-angular": "3.9.2",
    "ionicons": "3.0.0",
    "rxjs": "5.5.11",
    "sw-toolbox": "3.6.0",
    "zone.js": "0.8.26"
  },
  "devDependencies": {
    "@ionic/app-scripts": "3.2.0",
    "typescript": "~2.6.2"
  },
  "description": "An Ionic project",
  "cordova": {
    "plugins": {
      "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-sqlserver": {}
    },
    "platforms": [
      "android"
    ]
  }
}

我注意到“ cordova-plugin-sqlserver”的plugin.js文件以

开头
var exec = require('cordova/exec');

如果有人可以帮助我,那就太好了。

0 个答案:

没有答案