Closed elekdavid closed 6 years ago
Same here!
I've solved this issue on v3.0.1 by installing messageformat 1.x.x as a dependency of my own project. The following command is the one I issued:
$ npm install messageformat@1 --save
@lephyrus can I suggest you include a dependency change for messageformat (forcing 1.x.x) in a future 3.0.2? Because in the end I believe that ngx-translate-messageformat-compiler 3.0.1 pulls the latest messageformat. And that breaks us angular 5- users.
@legvalmont This library does not pull in any version of messageformat
. It is specified as a "peer dependency", which means you have to install a compatible version yourself. For v3 of this library, you have to install v1 of messageformat
, so you've done the right thing. NPM should have showed you a warning when you combined ngx-translate-messageformat-compiler v3 with messageformat v1.
I tried the following setup
Got following error at bootstrap time
Possible solution
#setIntlSupport()
function has been removed frommessageformat
atv2.0.0
(see release notes), but inTranslateMessageFormatCompiler
this function is called in ln20