question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[React Intl] The `Intl` APIs must be available in the runtime, and do not appear to be built-in. An `Intl` polyfill should be loaded.

See original GitHub issue

由于有OCX插件,头部必须加上标签 <meta http-equiv=“X-UA-Compatible” content=“IE=5; IE=10” />

polyfills: [‘ie11’]

然后就报异常了 [React Intl] The Intl APIs must be available in the runtime, and do not appear to be built-in. An Intl polyfill should be loaded. See: http://formatjs.io/guides/runtime-environments/ umi.js (56691,5)

The above error occurred in the <IntlProvider> component: in IntlProvider (created by _default) in LocaleProvider (created by _default) in _default (created by _default) in _default in Provider (created by DvaContainer) in DvaContainer Consider adding an error boundary to your tree to customize error handling behavior. Visit https://fb.me/react-error-boundaries to learn more about error boundaries.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
linqinghaocommented, Sep 4, 2018

在IE10下面没有Intl API, 需要polyfill. 我用下面的方法解决了。 第一步:

$ npm install --save intl @babel-polyfill

第二步:在src下新建 global.js

import '@babel/polyfill';

global.Intl = require('intl'); 
window.Intl = require('intl');

2018-09-04_142257

在IE9+上都可以跑了,不过布局都乱了。。flex布局不支持IE9以及部分支持IE10。

0reactions
chenyu1990commented, Jun 14, 2022

用了这个方法,鸿蒙2.0的浏览器还是一直转圈圈 md,华为浏览器没有 Notification 方法。

Read more comments on GitHub >

github_iconTop Results From Across the Web

Invariant Violation: [React Intl] The `Intl` APIs must be ...
... [React Intl] The Intl APIs must be available in the runtime, and do not appear to be built-in. An Intl polyfill should...
Read more >
Runtime Requirements | Format.JS
React Intl relies on these Intl APIs: Intl.NumberFormat: Available on IE11+; Intl.DateTimeFormat: Available on IE11+; Intl.PluralRules: This can be polyfilled ...
Read more >
api documentation for react-intl (v2.2.3)
... '[React Intl] The `Intl` APIs must be available in the runtime, ' + 'and do not appear to be built-in. An `Intl`...
Read more >
FAQ - next-intl
How is this library different from using react-intl?# · This library is built around the concept of namespaces and that components consume a...
Read more >
React i18n: A step-by-step guide to React-intl - Lokalise Blog
Polyfill options can be used with browsers that do not support the JavaScript API for i18n. React-intl builds on JavaScript's API for React ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found