离子2错误:找不到模块"发射器"在webpackMissingModule

时间:2017-09-13 17:06:25

标签: angular webpack ionic2

我正在为我的Ionic 2应用程序提供服务,突然出现以下错误。我没有看到任何在何处发现错误的痕迹,也没有在任何地方找到具有此名称的模块。你能告诉我这个错误是什么以及如何解决它吗?

Error: Cannot find module "emitter"
    at webpackMissingModule (http://localhost:8100/build/main.js:167136:79)
    at Object.map../af (http://localhost:8100/build/main.js:167136:163)
    at __webpack_require__ (http://localhost:8100/build/main.js:20:30)
    at Object.Config.register.settings.settings (http://localhost:8100/build/main.js:63719:69)
    at __webpack_require__ (http://localhost:8100/build/main.js:20:30)
    at Object.<anonymous> (http://localhost:8100/build/main.js:64883:66)
    at __webpack_require__ (http://localhost:8100/build/main.js:20:30)
    at Object.__webpack_exports__.a (http://localhost:8100/build/main.js:120241:71)
    at __webpack_require__ (http://localhost:8100/build/main.js:20:30)
    at Object.<anonymous> (http://localhost:8100/build/main.js:108237:79)

Ionic Framework: 2.0.0-rc.4
Ionic Native: 2.2.11
Ionic App Scripts: 1.3.12
Angular Core: 2.2.1
Angular Compiler CLI: 2.2.1
Node: 6.4.0
OS Platform: Windows 10
Navigator Platform: Win32
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36

app.module.ts 具有此初始配置

import { NgModule } from '@angular/core';

import { IonicApp, IonicModule } from 'ionic-angular';
import { CloudSettings, CloudModule } from '@ionic/cloud-angular';
import { Http } from '@angular/http';
import { AuthHttp, AuthConfig } from 'angular2-jwt';
import { Storage } from '@ionic/storage';

import { MyApp } from './app.component';

import { UserData } from '../providers/user-data';
import { Data } from '../providers/data';
import { FilterPipe } from '../pipes/filter/filter';
import { Geolocation } from '@ionic-native/geolocation';

const cloudSettings: CloudSettings = {
  'core': {
    'app_id': 'xxxxxx'
  }
};

@NgModule({
  declarations: [
    MyApp,
    SupportPage,
    FilterPipe
  ],
  imports: [
    IonicModule.forRoot(MyApp, {
      backButtonText: '',
      backButtonIcon: 'arrow-back',
      iconMode: 'ios',
      modalEnter: 'modal-slide-in',
      modalLeave: 'modal-slide-out',
      tabsPlacement: 'bottom',
      pageTransition: 'ios-transition'
    }),
    CloudModule.forRoot(cloudSettings),
  ],
  bootstrap: [IonicApp],
  entryComponents: [
    MyApp
  ],
  providers: [
    {
      provide: AuthHttp,
      useFactory: getAuthHttp,
      deps: [Http]
    },
    UserData,
    Data,
    Storage,
    Geolocation
  ]
})

package.json 看起来像这样。

{
  "name": "my-app",
  "description": "MyApp",
  "license": "Apache-2.0",
  "repository": {
    "type": "git",
    "url": "https://github.com/driftyco/ionic-conference-app.git"
  },
  "scripts": {
    "ionic:build": "ionic-app-scripts build",
    "ionic:serve": "ionic-app-scripts serve"
  },
  "dependencies": {
    "@angular/common": "2.2.1",
    "@angular/compiler": "2.2.1",
    "@angular/compiler-cli": "2.2.1",
    "@angular/core": "2.2.1",
    "@angular/forms": "2.2.1",
    "@angular/http": "2.2.1",
    "@angular/platform-browser": "2.2.1",
    "@angular/platform-browser-dynamic": "2.2.1",
    "@angular/platform-server": "2.2.1",
    "@ionic-native/core": "^3.4.4",
    "@ionic-native/geolocation": "^3.14.0",
    "@ionic/cloud-angular": "^0.12.0",
    "@ionic/storage": "1.1.7",
    "ionic-angular": "2.0.0-rc.4",
    "ionic-native": "2.2.11",
    "ionicons": "3.0.0",
    "lodash": "^4.17.4",
    "moment": "2.15.1",
    "rxjs": "5.0.0-beta.12",
    "zone.js": "0.6.26"
  },
  "devDependencies": {
    "@ionic/app-scripts": "^1.3.12",
    "ionic": "3.10.1",
    "typescript": "2.0.9",
    "webpack-bundle-analyzer": "^1.5.3"
  },
  "config": {
    "ionic_bundler": "webpack"
  },
  "cordovaPlugins": [
    "cordova-plugin-whitelist",
    {
      "locator": "https://github.com/VersoSolutions/CordovaClipboard",
      "id": "com.verso.cordova.clipboard"
    },
    {
      "locator": "https://github.com/apache/cordova-plugin-splashscreen.git",
      "id": "cordova-plugin-splashscreen"
    },
    "cordova-plugin-crosswalk-webview"
  ],
  "cordovaPlatforms": [
    "ios",
    "android"
  ]
}

0 个答案:

没有答案