'DeprecationWarning: OutgoingMessage.prototype._headers is deprecated
I am deploying my angular application on tomcat server. I have run the ng build --prod
command and copied my dist
folder on the server. Before accessing the page from the server, I wanted to test the app for myself on the localhost. When I try to run the command http-server ./dist
then, it throws the following error:
(node:8788) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated
Does anybody know how to fix this? I have tried searching on the web and all the answers are either obsolete or not working. EDIT: Editing this again, so that somebody can answer. EDIT: Anybody?
Solution 1:[1]
I resolved it by adding app.disable('x-powered-by');
after var app = express();
and then re-running this command: ng build --prod
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 |