I found some javascript that uses the function called fetch.
When I try to use in a node it gives me an error.
I tried adding this to my settings.js
functionGlobalContext: {
fetch:require(“cross-fetch/polyfill”),
// os:require(‘os’),
// jfive:require(“johnny-five”),
// j5board:require(“johnny-five”).Board({repl:false})
},
But that just gave a config error
Then I thought I need to install it.
“npm install fetch-polyfill --save”
That works fine - but the issue is that when the container is restarted in HA, the container is reset. So an “in-container” install won’t work.
What can I do ?