i am using 'kotlinx-serialization-runtime-js' in my firebase functions project. Everything so far went as expected. But since i am using:
val js = kotlinx.serialization.json.Json(JsonConfiguration.Stable)
.kotlinx.serialization.stringify(result)
i can't run it local in the functions emulator. When starting it shows in the log:
Error in handleMessage: {"frb":{"cwd":"/home/drindt/.../functions","projectId":"c*******r-d*********t","triggerId":"","emulators":{},"socketPath":"/tmp/fire_emu_144610.sock"},"opts":{"nodeBinary":"/usr/bin/node","env":{"GOOGLE_APPLICATION_CREDENTIALS":"/home/drindt/.config/firebase/credentials.json"}}} => RangeError: Maximum call stack size exceeded: RangeError: Maximum call stack size exceeded
at extractTriggers (/home/drindt/.npm-packages/lib/node_modules/firebase-tools/lib/extractTriggers.js:2:32)
The recursive invocation of extractTriggers lead to the problem. I found in another file the note that when this error happen it's because other modules are exported than just function modules. I look into the kotlin compiled js files confirm that. If i remove the stringify from above everything works. It would be very nice if i could have some assistance to solve this problem. Thank you for taking your time to read and help me.