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

[Bug]: Typescript: im Fehlerfall wird die Zeile aus dem transpilierten Code ausgegeben. #1810

Open
3 tasks done
ticaki opened this issue Jan 17, 2025 · 0 comments
Open
3 tasks done

Comments

@ticaki
Copy link

ticaki commented Jan 17, 2025

I'm sure that

  • This issue is still present in the current beta version of this adapter
  • There is no other (open) issue with the same topic (use the search!)
  • This issue is not described in the adapter documentation / FAQ (read the docs!)

Script type

Typescript

The problem

Bei einem Fehler oder Warnung wird die Zeile des transpilierten Codes ausgegeben und nicht die aus der TS Datei, dass macht das finden von Fehlern etwas anspruchsvoller.

Script

let obj:any = {};
log(obj.state.val) 

log:

javascript.2	09:10:42.455	error	script.js.Test.Skript_type_1: script.js.Test.Skript_type_1:4
javascript.2	09:10:42.456	error	at script.js.Test.Skript_type_1:4:15

Logausgabe im "großen" Log:

javascript.2 2025-01-17 09:10:42.456	error	at Script.runInContext (node:vm:149:12)
javascript.2 2025-01-17 09:10:42.456	error	at script.js.Test.Skript_type_1:4:15
javascript.2 2025-01-17 09:10:42.456	error	TypeError: Cannot read properties of undefined (reading 'val')
javascript.2 2025-01-17 09:10:42.455	error	^
javascript.2 2025-01-17 09:10:42.455	error	log(obj.state.val);
javascript.2 2025-01-17 09:10:42.455	error	script.js.Test.Skript_type_1: script.js.Test.Skript_type_1:4

iobroker.current.log (in debug mode!)

No response

Version of nodejs

v20.18.1

Version of ioBroker js-controller

7.0.6

Version of adapter

v8.8.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants