-
Notifications
You must be signed in to change notification settings - Fork 83
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
TypeError: Cannot read properties of undefined (reading 'getTime') #468
Comments
The superstatic package.json says
so it might be a misconfiguration in firebase-tools to accept Node 22. |
For anyone wondering, I believe the problem is that the As a result, the spread operator here does not include the |
Due to a [breaking change][1] in Node.js v22, `superstatic`, the local server used by Firebase `serve` and `emulators:start` commands throws an error. See, also, [firebase/superstatic#468 (comment)][2] for details. Apply a local patch to fix the issue, by accessing a property that is defined on the `Stat` instance and thus will be available. We currently do not need or use Firebase local serving, but I figured out the fix, so... ¯\\\_(ツ)_/¯ [1]: nodejs/node#50908 [2]: firebase/superstatic#468 (comment)
Fixed by #484 - published in |
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
).The text was updated successfully, but these errors were encountered: