Angular Nativescript程序引导:StaticInjectorError(AppModule)[EffectSources->;ErrorHandler]:

Angular Nativescript程序引导:StaticInjectorError(AppModule)[EffectSources->;ErrorHandler]:,angular,nativescript,rxjs6,Angular,Nativescript,Rxjs6,当我使用“tnsrunandroid--emulator”运行应用程序时,我遇到以下错误 已在设备上成功同步应用程序org.nativescript.ema emulator-5554。ActivityManager:启动程序 1005:org.nativescript.ema/u0a90用于活动 org.nativescript.ema/com.tns.nativescript活动JS:Sam活动 事件:activityCreated,活动: com.tns。NativeScriptActiv

当我使用“tnsrunandroid--emulator”运行应用程序时,我遇到以下错误

已在设备上成功同步应用程序org.nativescript.ema emulator-5554。ActivityManager:启动程序 1005:org.nativescript.ema/u0a90用于活动 org.nativescript.ema/com.tns.nativescript活动JS:Sam活动 事件:activityCreated,活动: com.tns。NativeScriptActivity@2689395,Bundle:null JS:Launched 具有以下意图的Android应用程序:意图{flg=0x10000000 cmp=org.nativescript.ema/com.tns.nativescript活动}。JS: 引导:引导时出错:引导: StaticInjectorError(AppModule)[EffectSources->ErrorHandler]:JS:
StaticInjectorError(平台:核心)[EffectSources->ErrorHandler]: JS:NullInjectorError:没有ErrorHandler的提供程序!JS:JS: 错误:NullInjectorError:没有ErrorHandler的提供程序!JS:在 空的 (file:///data/data/org.nativescript.ema/files/app/tns_modules/@角度/核心/束/核心.umd.js:1035:19) [angular]JS:at resolveToken (file:///data/data/org.nativescript.ema/files/app/tns_modules/@角度/核心/束/核心.umd.js:1279:24) [angular]JS:at tryResolveToken (file:///data/data/org.nativescript.ema/files/app/tns_modules/@角度/核心/束/核心。umd.js:1224:16) [angular]JS:at StaticInjector.get (file:///data/data/org.nativescript.ema/files/app/tns_modules/@角度/核心/束/核心.umd.js:1119:20) [angular]JS:at resolveToken (file:///data/data/org.nativescript.ema/files/app/tns_modules/@角度/核心/束/核心.umd.js:1279:24) [angular]JS:at tryResolveToken (file:///data/data/org.nativescript.ema/files/app/tns_mod... JS:山姆 活动事件:活动已启动,活动: com.tns。NativeScriptActivity@2689395JS:恢复事件活动: com.tns。NativeScriptActivity@2689395JS:Sam活动事件: activityResumed,Activity:com.tns。NativeScriptActivity@2689395

这是我的package.json文件

{
  "name": "ema",
  "description": "Employer Maid Agency",
  "license": "SEE LICENSE IN <your-license-filename>",
  "readme": "NativeScript Application",
  "repository": "<fill-your-repository-here>",
  "nativescript": {
    "id": "org.nativescript.ema",
    "tns-android": {
      "version": "4.1.2"
    }
  },
  "dependencies": {
    "@angular/animations": "^6.0.4",
    "@angular/common": "^6.0.4",
    "@angular/compiler": "^6.0.4",
    "@angular/core": "^6.0.4",
    "@angular/http": "^6.0.4",
    "@angular/platform-browser": "^6.0.4",
    "@angular/platform-browser-dynamic": "^6.0.4",
    "@angular/router": "^6.0.4",
    "@ngrx/effects": "^6.0.1",
    "@ngrx/store": "^6.0.1",
    "nativescript-angular": "^6.0.0",
    "nativescript-background-http": "^3.2.7",
    "nativescript-camera": "^4.0.2",
    "nativescript-fancyalert": "^1.2.0",
    "nativescript-feedback": "^1.2.0",
    "nativescript-loading-indicator": "^2.4.0",
    "nativescript-ngx-fonticon": "^4.2.0",
    "nativescript-snackbar": "^3.1.0",
    "nativescript-theme-core": "^1.0.4",
    "ramda": "^0.25.0",
    "reflect-metadata": "~0.1.10",
    "rxjs": "^6.2.0",
    "rxjs-compat": "^6.2.0",
    "tns-core-modules": "^4.1.0",
    "zone.js": "~0.8.18"
  },
  "devDependencies": {
    "@angular-devkit/core": "^0.6.8",
    "@angular/compiler-cli": "^6.0.4",
    "@ngtools/webpack": "^6.0.8",
    "babel-traverse": "^6.26.0",
    "babel-types": "^6.26.0",
    "babylon": "^6.18.0",
    "clean-webpack-plugin": "~0.1.19",
    "copy-webpack-plugin": "^4.5.1",
    "css-loader": "^0.28.11",
    "extract-text-webpack-plugin": "^3.0.2",
    "lazy": "^1.0.11",
    "nativescript-dev-typescript": "^0.7.1",
    "nativescript-dev-webpack": "^0.12.0",
    "nativescript-worker-loader": "^0.9.0",
    "raw-loader": "^0.5.1",
    "resolve-url-loader": "^2.3.0",
    "sass-loader": "^7.0.3",
    "typescript": "~2.7.2",
    "uglifyjs-webpack-plugin": "^1.2.5",
    "webpack": "^4.12.0",
    "webpack-bundle-analyzer": "^2.13.1",
    "webpack-cli": "~2.1.3",
    "webpack-sources": "^1.1.0"
  }
}
{
“名称”:“ema”,
“说明”:“雇主女佣机构”,
“许可证”:“请参阅中的许可证”,
“自述文件”:“NativeScript应用程序”,
“存储库”:“,
“nativescript”:{
“id”:“org.nativescript.ema”,
“tns安卓”:{
“版本”:“4.1.2”
}
},
“依赖项”:{
“@angular/animations”:“^6.0.4”,
“@angular/common”:“^6.0.4”,
“@angular/compiler”:“^6.0.4”,
“@angular/core”:“^6.0.4”,
“@angular/http”:“^6.0.4”,
“@angular/platform浏览器”:“^6.0.4”,
“@angular/platform browser dynamic”:“^6.0.4”,
“@angular/router”:“^6.0.4”,
“@ngrx/effects”:“^6.0.1”,
“@ngrx/store”:“^6.0.1”,
“nativescript angular”:“^6.0.0”,
“nativescript后台http”:“^3.2.7”,
“nativescript照相机”:“^4.0.2”,
“nativescript fancyalert”:“^1.2.0”,
“nativescript反馈”:“^1.2.0”,
“nativescript加载指示器”:“^2.4.0”,
“nativescript ngx fonticon”:“^4.2.0”,
“nativescript snackbar”:“^3.1.0”,
“nativescript主题核心”:“^1.0.4”,
“拉姆达”:“^0.25.0”,
“反映元数据”:“~0.1.10”,
“rxjs”:“^6.2.0”,
“rxjs compat”:“^6.2.0”,
“tns核心模块”:“^4.1.0”,
“zone.js”:“~0.8.18”
},
“依赖性”:{
“@angular devkit/core”:“^0.6.8”,
“@angular/compiler cli”:“^6.0.4”,
“@ngtools/webpack”:“^6.0.8”,
“巴别塔穿越”:“^6.26.0”,
“巴别塔类型”:“^6.26.0”,
“巴比伦”:“^6.18.0”,
“清理网页包插件”:“~0.1.19”,
“复制网页包插件”:“^4.5.1”,
“css加载器”:“^0.28.11”,
“提取文本网页包插件”:“^3.0.2”,
“懒惰”:“^1.0.11”,
“nativescript开发人员类型脚本”:“^0.7.1”,
“nativescript开发人员网页包”:“^0.12.0”,
“nativescript工作加载程序”:“^0.9.0”,
“原始加载程序”:“^0.5.1”,
“解析url加载程序”:“^2.3.0”,
“sass加载程序”:“^7.0.3”,
“类型脚本”:“~2.7.2”,
“uglifyjs网页包插件”:“^1.2.5”,
“网页包”:“^4.12.0”,
“网页包包分析器”:“^2.13.1”,
“webpack cli”:“~2.1.3”,
“网页源”:“^1.1.0”
}
}
我尝试在线搜索解决方案,但似乎以前从未报告过。我挣扎了一上午,但我无法解决它。如果您确实需要源代码,请务必让我知道

如果你能指导我去哪里,我将不胜感激


提前感谢。

StaticInjectorError(平台:核心)[EffectSources->ErrorHandler]:JS:NullInjectorError:没有ErrorHandler的提供程序
意味着您没有在
EffectSources
模块中导入
ErrorHandler
。如果这对您不起作用,则意味着您的一个库安装不正确。我发现问题如下。只需在app.module.ts中导入NativeScriptModule并导入{nativescript CommonModule}来自其他功能或共享模块中的“nativescript angular/common”。