Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intl is not defined #120

Closed
nuragic opened this issue Jun 12, 2015 · 6 comments
Closed

Intl is not defined #120

nuragic opened this issue Jun 12, 2015 · 6 comments
Labels

Comments

@nuragic
Copy link

nuragic commented Jun 12, 2015

Hi,

I'm using react-intl from a node (v2.0) cli program and I get: ReferenceError: Intl is not defined

Seems that it's caused by: https:/yahoo/react-intl/blob/master/src/mixin.js#L51-L52

When I import the Intl polyfill everything works correctly.

import Intl from 'intl';

Is that the correct way to solve this issue?

Thanks!

@caridy
Copy link
Collaborator

caridy commented Jun 12, 2015

Check the documentation on how to setup your environment, you need to polyfill intl if it is not available in your runtime:
http://formatjs.io/guides/runtime-environments/

@caridy caridy closed this as completed Jun 12, 2015
@gpbl
Copy link

gpbl commented Jun 12, 2015

@nuragic is Intl installed with node 0.12? In my setup it wasn't (I installed node with brew)

$ node
> console.log(Intl)
ReferenceError: Intl is not defined

@nuragic
Copy link
Author

nuragic commented Jun 12, 2015

@caridy ok thanks!
@gpbl ciao! :) nope, I don't have the Intl object in my node runtime... Same for me, I installed node with brew...

@gpbl
Copy link

gpbl commented Jun 12, 2015

@nuragic I could get it working installing node via brew install node --with-icu4c (bidere http://stackoverflow.com/questions/30410343/)

@nuragic
Copy link
Author

nuragic commented Jun 12, 2015

@gpbl cool, thanks!

@nuragic
Copy link
Author

nuragic commented Jun 15, 2015

@gpbl BTW, I just realized that I'm using iojs... 😅

ericf added a commit to ericf/react-intl that referenced this issue Nov 10, 2015
longlho pushed a commit that referenced this issue Apr 27, 2020
…, commas and element types… (#120)

* Print white-spaces and commas correctly from AST

Fixes #117

* Print element type correctly from AST

Correctly prints `number`, `date` and `time` element types in string format, instead of numbers `2`, `3` and `4`, etc.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants