Angular 9 Missing global reference
Please provide the following when reporting an issue: when adding @turf as a part of a Angular 9 project we get the following error.
errors.ts:30 ERROR Error: Uncaught (in promise): ReferenceError: global is not defined ReferenceError: global is not defined at Object../node_modules/has-symbols/index.js (index.js:3) at __webpack_require__ (bootstrap:84) at Object../node_modules/es-abstract/GetIntrinsic.js (GetIntrinsic.js:39) at __webpack_require__ (bootstrap:84) at Object../node_modules/es-abstract/helpers/callBind.js (callBind.js:5) at __webpack_require__ (bootstrap:84) at Object../node_modules/object-is/index.js (index.js:4) at __webpack_require__ (bootstrap:84) at Object../node_modules/deep-equal/index.js (index.js:3) at __webpack_require__ (bootstrap:84) at Object../node_modules/geojson-equality/index.js (index.js:2) at __webpack_require__ (bootstrap:84) at Module../node_modules/@turf/boolean-overlap/main.es.js (main.es.js:1) at __webpack_require__ (bootstrap:84) at Module../node_modules/@turf/turf/index.js (index.js:1) at resolvePromise (zone-evergreen.js:798) [angular] at resolvePromise (zone-evergreen.js:750) [angular] at :4200/polyfills.7b850002e03099b08e07.js:920:21 [angular] at Object.onInvokeTask (ng_zone.ts:293) [angular] at drainMicroTaskQueue (zone-evergreen.js:569) [<root>]
this is because Angular is not providing a global variable anymore
Which version of turf are you using?
This concerns any version using geojson-equality. See https://github.com/inspect-js/has-symbols/issues/11
We can probably bump geojson-equality's deep-equal dependency to ^2.0.5
Any solution for this? We have the same problem...