Same as : Strange log line
From time to time I get the Warnung :
express deprecated res.status("200"): use res.status(200) instead at
It comes from the http Response Node :
I set there a Status Code (without quotation) but in the flows.json is it store as a String:
NodeRed 3.0.2
Node: 19.2.0
Npm:9.1.3
Colin
2
Does it happen if you use a supported version of nodejs - 14, 16, or 18?
Node-RED is currently only tested (automation tests) against Node JS 14 and 16.
So I would personally not use NodeJS 18 unless you have a specific requirement.
YMMV
This is ExpressJS not Node.js - string status codes have been deprecated for a while. They should be an integer.
Colin
5
This page says that 18 is supported, with 16 recommended. That does not necessarily conflict with your statement I know.
As @TotallyInformation says, this is related to express, the version of node.js is not relevant.
@MeGusta can you raise an issue? We really should be ensuring this is a number to avoid the warning message.
It's a known issue and will be fixed in the next release:
1 Like
system
Closed
8
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.