Closed jlandsmann closed 5 years ago
I can confirm that Angular8 does not seem to be supported yet.
I get the following error: Can't resolve 'messageformat' in .........\node_modules\ngx-translate-messageformat-compiler\fesm2015'
Hi, I have the same problem here, what's the fix?
I have the same problem when running Ivy as @SemVC7
Error: Can't resolve all parameters for TranslateMessageFormatCompiler: (?).
at getUndecoratedInjectableFactory (vendor.js:64488)
at injectableDefOrInjectorDefFactory (vendor.js:64472)
at providerToFactory (vendor.js:64573)
at providerToRecord (vendor.js:64518)
at R3Injector.processProvider (vendor.js:64379)
at vendor.js:64344
at vendor.js:64604
at Array.forEach (<anonymous>)
at deepForEach (vendor.js:64600)
at R3Injector.processInjectorType (vendor.js:64340)
me too... please fix it.
@SemVC7 @FirstLikeComment @Carniatto @KirillFedorov did you installed the messageformat
package as described in the README? I did not and it worked until Angular v8. Than I got the same error.
But with npm i --save messageformat
(as described in the README) it now works (for me).
I have messageformat in package.json, but doesn't work :-(
"messageformat": "^2.3.0"
"ngx-translate-messageformat-compiler": "^4.4.0"
with TranslateMessageFormatDebugCompiler is working... what difference?
@lephyrus can you help with problem?
@KirillFedorov We need a much better problem description to be able to help. Also, this is not about general Angular 8 compatibility, which is working for many (including me). Even the Example App at the top of the README is using Angular 8.
This issue is currently closed, which is another reason you're not getting help. Please open a new issue with a more meaningful title. Does the problem only occur when turning on Ivy? Only when doing a prod (AOT) build? If it has worked before, what did you change? Please list the steps to reproduce the problem. Ideally, add a link to StackBlitz or a small repo where people can see the problem and try to help you.
Thanks, i`ll open new issue and try to create demo app to reproduce the problem.
Hopefully this ends up helping people. I have managed to get this working with angular 8 and ivy enabled using the following:
export function TranslateMessageFormatCompilerFactory() { return new TranslateMessageFormatCompiler(); }
TranslateModule.forRoot({ loader: { provide: TranslateLoader, useFactory: (createTranslateLoader), deps: [HttpClient] }, compiler: { provide: TranslateCompiler, useFactory: (TranslateMessageFormatCompilerFactory) } })
Might not be the best or correct fix but it works for me
Yes please! npm WARN ngx-translate-messageformat-compiler@4.4.0 requires a peer of @angular/core@^6.0.0 || ^7.0.0 but none is installed. You must install peer dependencies yourself.