rauniorooR
Denoβ€’2y agoβ€’
8 replies
raunioroo

Deny env permissions silently (without throwing)

Hi. An npm module I'm using tries to read, or rather check for an existence of an env variable. The problem is it throws due to not having permission to access env.

I'd rather not give any env permissions to any of my scripts.

I think the offending npm module can do with having env variables undefined, it's just that it throws just trying to see if the variables are there. Can I somehow make Deno silently return empty/null without throwing an error?

(if it's any importance, the offending module is npm:deepl-node , which uses npm:axios, which tries to see if there is something in NODE_EXTRA_CA_CERTS and is then unable to handle the access denied exception)
Was this page helpful?