无法解析TranslateService的所有参数:(?,?,?,?,?,[object Object] [英] Can't resolve all parameters for TranslateService: (?, ?, ?, ?, ?, [object Object]

查看:1347
本文介绍了无法解析TranslateService的所有参数:(?,?,?,?,?,[object Object]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从昨天开始无法在浏览器中测试我的离子3应用程序,因为我收到与 TranslateService 相关的以下错误。这似乎与我的代码无关,因为当我切换到以前的版本时我也遇到了同样的问题,尽管它在那一刻工作正常。我尝试重新安装节点模块,但仍然没有运气。你知道我应该怎么做才能解决这个问题吗?谢谢!

I could not test my ionic 3 app in browser anymore since yesterday because I get the following error related to TranslateService. This seems not related to my code since I also face the same issue when I switch to my previous versions, although it worked fine at that moment. I tried to re-install the node modules with but still no luck. Do you know what I should do to solve this problem? Thanks!


错误错误:未捕获(在承诺中):错误:无法解析TranslateService的所有
参数:(? ,?,?,?,?,[object Object],
[object Object])。错误:无法解析
TranslateService的所有参数:(?,?,?,?,?,[object Object],[object Object])。 syntaxError上的
(compiler.js:466)
at CompileMetadataResolver._getDependenciesMetadata(compiler.js:15544)
at CompileMetadataResolver._getTypeMetadata(compiler.js:15379)
at CompileMetadataResolver。 _getInjectableMetadata(compiler.js:15359)
at CompileMetadataResolver.getProviderMetadata(compiler.js:15719)
at compiler.js:15630
at Array.forEach()
at CompileMetadataResolver。 _getProvidersMetadata(compiler.js:15590)
at compiler.js:15080
at Array.forEach()
at syntaxError(compiler.js:466)
at CompileMetadataResolver._getDependenciesMetadata( compiler.js:15544)
at CompileMetadataResolver._getTypeMetadata(compiler.js:15379)
at CompileMetadataResolver._getInjectableMetadata(compiler.js:15359)
at CompileMetadataResolver.getProviderMetadata(compiler.js:15719) )
at compiler.js:15630
在Array.forEach()
at CompileMetadataResolver._getProvidersMetadata(compiler.js:15590)
at compiler.js:15080
at Array.forEach()
at c(polyfills.js:3)
at c (polyfills.js:3)
at polyfills.js:3
at t.invokeTask(polyfills.js:3)
at Object.onInvokeTask(core.js:4617)
at t.invokeTask(polyfills.js:3)
at r.runTask(polyfills.js:3)
at o(polyfills.js:3)

ERROR Error: Uncaught (in promise): Error: Can't resolve all parameters for TranslateService: (?, ?, ?, ?, ?, [object Object], [object Object]). Error: Can't resolve all parameters for TranslateService: (?, ?, ?, ?, ?, [object Object], [object Object]). at syntaxError (compiler.js:466) at CompileMetadataResolver._getDependenciesMetadata (compiler.js:15544) at CompileMetadataResolver._getTypeMetadata (compiler.js:15379) at CompileMetadataResolver._getInjectableMetadata (compiler.js:15359) at CompileMetadataResolver.getProviderMetadata (compiler.js:15719) at compiler.js:15630 at Array.forEach () at CompileMetadataResolver._getProvidersMetadata (compiler.js:15590) at compiler.js:15080 at Array.forEach () at syntaxError (compiler.js:466) at CompileMetadataResolver._getDependenciesMetadata (compiler.js:15544) at CompileMetadataResolver._getTypeMetadata (compiler.js:15379) at CompileMetadataResolver._getInjectableMetadata (compiler.js:15359) at CompileMetadataResolver.getProviderMetadata (compiler.js:15719) at compiler.js:15630 at Array.forEach () at CompileMetadataResolver._getProvidersMetadata (compiler.js:15590) at compiler.js:15080 at Array.forEach () at c (polyfills.js:3) at c (polyfills.js:3) at polyfills.js:3 at t.invokeTask (polyfills.js:3) at Object.onInvokeTask (core.js:4617) at t.invokeTask (polyfills.js:3) at r.runTask (polyfills.js:3) at o (polyfills.js:3)

从我的 package.json 我可以看到:@ ngx-translate / core:^ 9.1.1和@ ngx-translate / http -loader:^ 2.0.1

From my package.json I can see: @ngx-translate/core": "^9.1.1" and @ngx-translate/http-loader": "^2.0.1"

我的离子信息


@ionic/cli-utils  : 1.19.2
ionic (Ionic CLI) : 3.20.0

全球套餐:

cordova (Cordova CLI) : 8.0.0 

本地包裹:

@ionic/app-scripts : 3.1.0
Cordova Platforms  : android 7.1.0 browser 5.0.3 ios 4.4.0
Ionic Framework    : ionic-angular 3.9.2

系统:

Android SDK Tools : 25.2.5
ios-deploy        : 1.9.2 
Node              : v6.10.0
npm               : 3.10.10 
OS                : macOS High Sierra
Xcode             : Xcode 9.3.1 Build version 9E501 

环境变量:

ANDROID_HOME : /usr/local/Cellar/android-sdk/24.1.2/

其他:

backend : pro



推荐答案

今天我们在我们的工作站中遇到了与其他工作站共享相同node_module文件夹的同样问题!
该错误似乎与最新的Chrome更新版本或生成的ts源地图或两者相关,因为当我们在开发模式下运行我们的应用程序时,其他浏览器工作正常...
快速修复是进行生产构建并将其加载到Chrome上,然后在开发模式下再次尝试。
至少这对我们有用,也许会为其他人工作。

Today we faced the same problem in one of our workstation that shares the same node_module folder with the others! The error seems to be related with the latest Chrome updated version or the generated ts Source Maps or both, because when we were running our apps in dev mode to other browsers were working fine... A quick fix is to do a production build and load it on Chrome , then try again in dev mode. At least this worked for us and maybe will work for others to.

这篇关于无法解析TranslateService的所有参数:(?,?,?,?,?,[object Object]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆