asciidoctor / asciidoctor-kroki

Asciidoctor.js extension to convert diagrams to images using Kroki!
https://kroki.io/
MIT License
146 stars 47 forks source link

(node:428317) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated #427

Open mmattel opened 11 months ago

mmattel commented 11 months ago

Using node v16.13.2

I started to get error messages when running yarn serve:

(node:428317) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated

There are 5 occurrences of ._headers in the final build of asciidoctor-kroki.js.

Doing some research, a possible fix can be done by replacing: ._headers with .getHeaders()

ggrossetie commented 2 months ago

I think it comes from https://github.com/browserify/http-browserify Having said that, are you using https://github.com/asciidoctor/asciidoctor-kroki/blob/master/dist/browser/asciidoctor-kroki.js in a Node environment? This file should only be used in a browser environment.