Open Deleplace opened 3 months ago
The superstatic package.json says
"engines": {
"node": "18 || 20"
}
so it might be a misconfiguration in firebase-tools to accept Node 22.
For anyone wondering, I believe the problem is that the mtime
property is now initially defined on the Stat
prototype (instead of on the Stat
instance itself (due to https://github.com/nodejs/node/pull/50908).
As a result, the spread operator here does not include the mtime
key (since the spread operator does not consider enumerable properties on the prototype).
Hello, thank you for the nice static web server.
I reported this bug in firebase-tools (firebase-cli) and I'm not sure of the root cause, but the error stacktrace involved this line of superstatic dereferencing an fs stats time object which happened to be
undefined
.We (2 people) could reproduce this in macOS and Linux when using Node 22.
However, the bug seems to not occur when using Node 20.
I'm using superstatic 9.0.3 (as found in my system at
/home/linuxbrew/.linuxbrew/Cellar/firebase-cli/13.8.3/libexec/lib/node_modules/firebase-tools/node_modules/superstatic/package.json
).