We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9bbb1a2 commit 04e9822Copy full SHA for 04e9822
2 files changed
polyfill.ts
@@ -0,0 +1,16 @@
1
+// Polyfill the removed util.isNullOrUndefined (Node 23+ broke tfjs-node < ~4.23)
2
+let util = require('util')
3
+
4
+// Only patch if the function is missing
5
+if (typeof util.isNullOrUndefined !== 'function') {
6
+ util.isNullOrUndefined = (val: any) => val === null || val === undefined
7
+}
8
9
+// Optional: also patch isUndefined / isDefined if you see similar errors later
10
+if (typeof util.isUndefined !== 'function') {
11
+ util.isUndefined = (val: any) => val === undefined
12
13
14
+if (typeof util.isDefined !== 'function') {
15
+ util.isDefined = (val: any) => val !== undefined
16
server.ts
@@ -1,3 +1,4 @@
+import './polyfill'
import express from 'express'
import { print } from 'listening-on'
import { main as train } from './train'
0 commit comments