Closed Biboba closed 4 years ago
I made a repo: https://github.com/Biboba/geojson-bug-4-14 With the same data from CDN it works: https://codepen.io/sdksds/pen/dyopGej
You can fix this by adding an option to the webpack.config.js
node section.
node: {
process: false,
global: false,
Buffer: false, // ADD THIS
fs: 'empty',
},
This will fix it. I'll update the template apps for the next release. Thanks!
Indeed, it works fine now. Many thanks for the quick fix !
I just upgraded from 4.13 to 4.14 and noticed that my geoJSON file is not displayed any more and the following error is logged:
ReferenceError: global is not defined
Description
I am trying to display a geoJson layer on a non-mercator projected coordinate system.
Expected Behavior
GeoJSON layer should be displayed.
Actual Behavior
GeoJSON layer is not displayed and an error is logged.
Possible Fix
The same sample works fine with js api from CDN so it is related to webpack
Steps to Reproduce
arcgis create my-application
npm start
Context
Adding a geoJSON layer to a non mercator projected coordinate system.
Your Environment