Select to view content in your preferred language

Map is not displayed when react app is deployed

642
2
Jump to solution
05-19-2022 02:22 PM
LOU_Sud-OuestThales_Services
Emerging Contributor

Hello everyone,


We are using ArcGis Entreprise 10.9.1. We are working on an application written in ReactJS V4 (using TypeScript).

When we run the application locally (on dev environment using an npm start command), the application works fine. (map is displayed and a promise is used then to display some widgets)

But when we deploy the application on ArcGis Portal (built with ArcGIS/Webpack-plugin extension), the map is not displayed (and the widgets are not shown) on the same browser (local machine)

We are using topo-vector map from ArcGis Online, and there is no error or warning message in the browser console and in the ArcGis Server Manager logs

We have also analyzed the network packets from the browser and the map information seem to be loaded successfully (but not displayed and the promise is never resolved)

Any idea? 

 

Thanks

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
ReneRubalcava
Honored Contributor

Usually this is related to babel and the browserlist settings noted here

https://github.com/Esri/jsapi-resources/tree/master/esm-samples/jsapi-create-react-app#misc

But without a test repo, no way to tell.

 

 

 

View solution in original post

0 Kudos
2 Replies
ReneRubalcava
Honored Contributor

Usually this is related to babel and the browserlist settings noted here

https://github.com/Esri/jsapi-resources/tree/master/esm-samples/jsapi-create-react-app#misc

But without a test repo, no way to tell.

 

 

 

0 Kudos
LOU_Sud-OuestThales_Services
Emerging Contributor

Hi

 

Thanls for your help, babel was the problem. node_modules folder was modified by babel and we have exclude it from generation (and some minor improvements)