Skip to content
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

RangeError. Internal Error. Icu error in custom script #397

Closed
azzamsa opened this issue Mar 24, 2023 · 2 comments
Closed

RangeError. Internal Error. Icu error in custom script #397

azzamsa opened this issue Mar 24, 2023 · 2 comments

Comments

@azzamsa
Copy link

azzamsa commented Mar 24, 2023

Hi.

I want to have my words sorted. I write this script in node, and it runs fine.

let text =
  "emacs nnn jq ShellCheck tidy neofetch stow workrave pandoc flameshot copyq";

let sorted = text
  .split(" ")
  .sort((a, b) => a.localeCompare(b))
  .join(" ");
console.log(sorted);
⬢ ❯ node sort.js
copyq emacs flameshot jq neofetch nnn pandoc ShellCheck stow tidy workrave

But, when putting it in boop, I got the error below. RangeError. Internal Error. Icu error

/**
     {
         "api":1,
         "name":"Sort words",
         "description":"Sort words alphabetically",
         "author":"Azzam S.A (https://github.com/azzams)",
         "icon":"sort-characters",
         "tags":"sort,alphabet"
     }
 **/

function main(input) {
  input.text = input.text
    .replace(/\n$/, "")
    .split(" ")
    .sort((a, b) => a.localeCompare(b))
    .join(" ");
}

image

Related:

@randoogle
Copy link

I'm thinking that the internal node.js that Boop-GTK relies on doesn't have full-icu
See nodejs/node#12529

@azzamsa
Copy link
Author

azzamsa commented Sep 20, 2023

I have fully migrated to https://github.com/liferooter/textpieces

@azzamsa azzamsa closed this as completed Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants