In my react app, I'm seeing the following error in Chrome devtools:

Uncaught (in promise) RangeError: Invalid language tag: en-au;q=1

The error is also currently visible at the arcgis official site: https://developers.arcgis.com/javascript/latest/sample-code/widgets-frameworks-react/index.html

This error seems to be related to the underlying dojo.js library that arcgis code is using.

I am not seeing in the arcgis react setup, how to set dojo config for non-custom builds.

Custom build docs: https://developers.arcgis.com/javascript/latest/guide/using-npm/

Using the arcgis react code, how do I pass dojo config?

Screenshot of error (notice no widgets are rendered -- hence the white screen): enter image description here

Arcgis official quickstart is throwing same error (see screenshot): enter image description here


Answer provided here: https://stackoverflow.com/a/60944160/471249


import { loadModules } from 'esri-loader';

const options = {
  dojoConfig: {
    async: true,
    locale: 'en-us'

loadModules(['esri/map'], options)
  .then(([Map]) => {
    // here you create Map
  .catch(err => {
    // handle any errors

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.