Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

(node:26972) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0'

Tags:

node.js

ssl

dymo

I am using DymoJS (https://www.npmjs.com/package/dymojs) to print labels on my local machine and I get this error:

(node:26972) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.

I tried installing ssl-root-cas (https://www.npmjs.com/package/ssl-root-cas) but that does not help. I also tried changing NODE_TLS_REJECT_UNAUTHORIZED to '1' in the dymojs library but it does not work either.

like image 223
blrsk Avatar asked Mar 10 '26 12:03

blrsk


1 Answers

This warning appears once for each of the five JavaScript files that get run, and can be safely ignored (in a development environment) and does not affect the running of the tutorial.

Modify the lines to set the NODE_TLS_REJECT_UNAUTHORIZED environment variable to 1.

process.env["NODE_TLS_REJECT_UNAUTHORIZED"] = 1;
like image 167
WhiteBite Avatar answered Mar 13 '26 03:03

WhiteBite



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!