I found out that version 4.22.0 of tensorflow is not compatible with node 23 due to util_1.isNullOrUndefined. This util and others were removed in node 23. Solution was to downgrade node to version 22.