- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2024 11:46 AM
Hi!
I am incredibly excited by the potential the new SDK and Fluent tooling promises developers in the community. I have mostly been able to work out an ideal workflow developing with TypeScript and Jest unit tests locally while pushing to git and ServiceNow remotely.
There are however a few pains I just can't seem to overcome so thus I turn to the forums for help.
1. I have seen it discussed on other posts that importing ES modules in other applications is not possible. You would have to create a script include to expose module functionality elsewhere. That's entirely fine by me as a premise, but I can't seem to make it work. Any time I call functions in a script include containing "require" syntax from a different scope, I am met with this error:
Script execution error: Error Description: "require" is not defined., Script ES Level: 200
Are there any examples out there of this actually working?
2. I haven't been able to get the Fluent language server to work at all. Not with the vscode extension or in the IDE. Here is an example of an error I get whenever I try to edit now.ts files:
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2024 09:42 AM - edited 09-05-2024 11:02 AM
Hi Adrian,
For the first question, we are planning to add support for cross-scope module access in Zurich. Until then, the script include workaround should work, but we found a bug (PRB1767574) that would sometimes happen when crossing the scope boundary during a script execution. Require would not get defined in the new scope being called into causing the "require is not defined" error. We have pushed the fix up and it should be available in Xanadu Patch 2 and beyond.
Sorry for the inconvenience, most of this stuff is in early days and we're still working out the final design and some of the kinks.
-Sean
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2024 09:25 AM
Hello Adrian!
For question 2, are you on a Windows machine by any change?
For question 3, this is coming soon! we are actively working on OAuth support and support for other git providers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2024 09:34 AM
It's good to hear that Azure Repos and other providers will be supported in the near future.
As per your reply, I have indeed been working on a windows machine while attempting to get Fluent working.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2024 10:30 AM
thanks, Adrian. There is a known issue with Fluent in Windows with the 1.0 version. Issue has been fixed in our 1.0.1 release which will be available on September 10th.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2024 09:42 AM - edited 09-05-2024 11:02 AM
Hi Adrian,
For the first question, we are planning to add support for cross-scope module access in Zurich. Until then, the script include workaround should work, but we found a bug (PRB1767574) that would sometimes happen when crossing the scope boundary during a script execution. Require would not get defined in the new scope being called into causing the "require is not defined" error. We have pushed the fix up and it should be available in Xanadu Patch 2 and beyond.
Sorry for the inconvenience, most of this stuff is in early days and we're still working out the final design and some of the kinks.
-Sean