AppID: A64366E6-49A2-CBBC-FF22-93A591AEF200
pagename: testbk
deployment model name?
You can find the custom code block in the logic of the button “testaxios”
Hi Vladimir, your comment explains how to import a JS file from an external site… but is there perhaps a way to install a JS library in the file system of a UI Builder container, which can then be available in custom functions (without fetching code from an external site, similar to how NPM modules can be installed in the file system for Cloud Code)?
an error results, Uncaught (in promise) Error: Invalid UNTIL value: 20230201T023000Z\nRRULE:FREQ=MONTHLY at checkStatus (sdk.js:14:918562)
I have the rrule module installed on the server and when I run a similar custom code function using an API service, there’s no error (following the recipe Mark provided for how to use NPM modules in Cloud Code). So something is wrong in the UI Builder version of things… any ideas? I realize this might be outside of the scope of support you provide, debugging external JS library stuff… but it would be really nice if there was a clear recipe for how to use NPM modules in Codeless logic in UI Builder
So I found a bug in the way I was calling things. Now the error is
Uncaught (in promise) Error: Module name "rrule" has not been loaded yet for context: _. Use require([])
So it seems your statement " 1. you can not use the NodeJS Require const x = require('x') in the UIBuilder code because such import is not supported in the Browser ENV" is correct
No, I’m new to JS and coding in general, I have no idea how to “change the lib to be supported in the browser without an additional build phase”… but will research that now! If you have a link to point me in the right direction, much appreciated, if not thanks for your help anyway!