Page 1 of 1

Adding turf.js to Server Code libraries

Posted: Thu Jun 07, 2018 8:40 am
by Dupdroid

I want to add turf.js to my server code library.

When testing the library I get the following errors:

https://npmcdn.com/@turf/turf@5.1.6/t...

Script turf: TypeError: Cannot redefine property "name" of function IndexOutOfBoundsException (message) { Error.call(this); this.message = message || ''; }

---------------------

https://npmcdn.com/@turf/turf@5.1.6/t...

Script turf: TypeError: Cannot redefine property "name" of function e(e){t.call(this),this.message=e||""}

Can someone please help?


Adding turf.js to Server Code libraries

Posted: Thu Jun 07, 2018 10:13 am
by Serhii Kulibaba

Hello,

We are very sorry, but this is something outside the scope (https://docs.appery.io/docs/general-s...) of our standard support.


Adding turf.js to Server Code libraries

Posted: Thu Jun 07, 2018 11:04 am
by Dupdroid

You could at least mention if there's some special considerations to keep in mind when creating a library that might cause this seeing that your documentation on the subject is very basic.


Adding turf.js to Server Code libraries

Posted: Thu Jun 07, 2018 3:22 pm
by Dupdroid

Ok Serhii,

I have managed to add the library and it tests ok. But the server code fails without any info in the Trace tab. Error: Script execution failed. Details have been added to Trace tab.

I have shared the server code with support: https://api.appery.io/rest/1/code/449...

Over to you.


Adding turf.js to Server Code libraries

Posted: Fri Jun 15, 2018 11:50 am
by Evgene Karachevtsev

Hello,

You can find the log on the Trace tab:
"8.6.2018, 9:54:10 AM: Library turf: Method code too large!"
Could you please check it?


Adding turf.js to Server Code libraries

Posted: Mon Jun 18, 2018 7:48 am
by Dupdroid

Hi Evgene. Thank you for manually adding an entry to the log. However, this does not help me or anyone else for that matter. When I re-run the script it does not update the log. So other people will also be left in the dark for days as to the reason why their scripts fail without info in the log. Is there documentation stating the limit of the dependency scripts?


Adding turf.js to Server Code libraries

Posted: Mon Jun 18, 2018 12:12 pm
by Serhii Kulibaba

It seems that library uses the function-wrapper, which is big. Appery.io does not support such big functions. You need to change the library manually, or use another one.