-
Notifications
You must be signed in to change notification settings - Fork 954
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Turf.js@5 breaks on Mobile Safari on iOS 9.x and 10 #1243
Comments
🤔 sounds like it might be a https://cdn.jsdelivr.net/npm/turf-jsts@1.2.3/jsts.js 🤞 Next release (v6.0) we won't have |
@thesephist do you know from which version of Turf does it started to break with this error? |
Turf version 3.9.0 works as expected; turf version 3.10.0 breaks, and as of turf 5.1.6 the issue is still present. For sake of recordkeeping here's the corresponding issue on turf-jsts, which seems like the cause of the problem: DenisCarriere/turf-jsts#3 |
Seeing this same issue with Turf 5.1.6, React Native 0.53, in both Android 8.0 emulator and Android 6.0 HW. JavaScript: Modifying the code to use separate imports (e.g. Also, |
I also encountered this error for PhantomJS. Unfortunately, I couldn't find a workaround so far. Has there already any release date been announced for the upcoming turf.js version 6.0? |
At the moment, we're converting TurfJS to completely to Typescript, that way we don't have any CommonJS transpiling issues moving forward. (for more info #1240) At the moment, there are many modules that have already been published under @TobiTobsen92 @karijkangas Is there a particular module you are working with? Noticing you are using |
I'm currently using separate imports and it's working ok. I added my comment above just with the hope that it would be picked up by search engines as it would have helped me to save some time in troubleshooting. |
@karijkangas Thanks for the feedback! 👍 I'm glad to hear that separate imports do in fact work. Once the code is ported over the Typescript, we "should" not have any issues with Mobile Safari 🤞 |
@DenisCarriere I'm currently working with a range of modules, the particular functions which I'm using are |
Closing; #88 is the tracking issue for JSTS. |
Using Turf 5.1.6, React Native 0.56.1. Getting 'Attempting to change configurable attribute of unconfigurable property.' when running my project on Android. Tried using import tuf from '@turf/turf' as @karijkangas suggested, but it still gave me the same error. This workes on iOS however. |
I was getting the same build error on Android with RN 0.56.1 @gusoskar Check which specific module you are using from turf and see if a 6.0 version is available. For example I needed bbox so I installed @turf/bbox@latest => installs 6.0.1 That fixed my issue. As @DenisCarriere mentioned they are porting the library over to Typescript (6.0) to avoid these transpiling errors |
Any update? |
Please consult my reply to this thread, dated June 24, 2018, above, which contains a link to the issue that deals with fixing this issue, #88. and has a recent reply six days ago about a potential fix for the issue. |
I have reproduced this with the full, CDN-served build of turfjs. An easy way to see this is to navigate to turf's docs site on an iOS 9.x or 10 device. Turf examples do not work as expected, and when inspected over a Mac, mobile Safari gives the error:
Attempting to change configurable attribute of unconfigurable property.
I was not able to narrow this down to a single turf module yet, but
bboxPolygon
is a potential candidate, judging from neighboring code in the minified build. The error occurs at1:248611
with the CDN build for turf@5. Seems to be caused by anObject.defineProperties
to override thename
prop on the globalError
class.Seems to work on all other modern browsers by my testing.
EDIT: the exact build I'm using was downloaded from
https://cdn.jsdelivr.net/npm/@turf/turf@5/turf.min.js
.The text was updated successfully, but these errors were encountered: