S-IAF
Join ServerSapphire - Imagine a framework
sapphire-support
String Length error while trying to register a command
Cclownn12/31/2022
command registry for command "setup" at path "/home/userland/dev/shnhelper/dist/commands/Configuration/setup.js" ExpectedConstraintError > s.string.lengthGreaterThanOrEqual
2022-12-31 12:34:33 - ERROR - Invalid string length
2022-12-31 12:34:33 - ERROR -
2022-12-31 12:34:33 - ERROR - Expected: expected.length >= 1
2022-12-31 12:34:33 - ERROR -
2022-12-31 12:34:33 - ERROR - Received:
2022-12-31 12:34:33 - ERROR - | ''
2022-12-31 12:34:33 - ERROR -
2022-12-31 12:34:33 - ERROR - Invalid string length
2022-12-31 12:34:33 - ERROR -
2022-12-31 12:34:33 - ERROR - Expected: expected.length >= 1
2022-12-31 12:34:33 - ERROR -
2022-12-31 12:34:33 - ERROR - Received:
2022-12-31 12:34:33 - ERROR - | ''
2022-12-31 12:34:33 - ERROR -
Cclownn12/31/2022
Cclownn12/31/2022
apparently the error appears when i run this function

Cclownn12/31/2022
i don't have any idea of what is s.string.lengthGreaterThanOrEqual
Cclownn12/31/2022
ping me if anyone found a answer
FFavna12/31/2022
s.string.lengthGreaterThanOrEqual
means the string has to have a length greater than or equal to something, in this case 1. And the actual value is | ''
. Can't tell from your code but the error should be able to print a full stracktrace as well.
Solution
Cclownn12/31/2022
I found the error; Basically when I called the "super" function inside the constructor, it overwrote all the configuration provided by the decorator
FFavna12/31/2022
oh yeah I overlooked that but that is correct
FFavna12/31/2022
you have to use either one of the two
Cclownn12/31/2022
yeah