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

[NPM] Errors littering console #351

Closed
zacbarton opened this issue Mar 7, 2016 · 5 comments
Closed

[NPM] Errors littering console #351

zacbarton opened this issue Mar 7, 2016 · 5 comments

Comments

@zacbarton
Copy link

While developing with v2 I've noticed loads of the below errors;

[React Intl] Missing message: {id} for locale: {locale} using default message as fallback.

From what I can tell the version I installed from npm ([email protected]) appears to be missing the below lines found in src;

// This prevents warnings from littering the console in development
// when no `messages` are passed into the <IntlProvider> for the
// default locale, and a default message is in the source.
if (!defaultMessage ||
(locale && locale.toLowerCase() !== defaultLocale.toLowerCase())) {
/// and so on ...

The missing code is exactly what I'm looking for to remove these console errors while developing - I want to use the messages I've defined in my components.

@ericf
Copy link
Collaborator

ericf commented Mar 7, 2016

This change will be out in the next release since it's on master.

@ericf ericf closed this as completed Mar 7, 2016
@joncursi
Copy link

@ericf has this been released? I'm still getting errors on 2.1.3, and the problem is unfortunately worse for react-native development since console.error messages flash the entire screen. Thanks!

screen shot 2016-07-17 at 4 32 35 am

@ericf
Copy link
Collaborator

ericf commented Jul 17, 2016

@joncursi yes it was released. Is this not a valid error? Maybe you should try setting <IntlProvider defaultLocale='en-US'>.

@joncursi
Copy link

@ericf that solved the problem, thanks! The way that error was worded led me to believe that it was an issue with the messages, not the locale

@ericf
Copy link
Collaborator

ericf commented Jul 18, 2016

@joncursi I guess it could be updated to output what the default locale is. Feel free to create an issue or PR for improving that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants