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

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

问题描述

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!

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)

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

My ionic info

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

global packages:

cordova (Cordova CLI) : 8.0.0 

local packages:

@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

System:

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 

Environment Variables:

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

Misc:

backend : pro

解决方案

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天全站免登陆