I am new to creating custom nodes and I am attempting to use axios with the node. The API get request is working fine from a JS file but with a Node-Red flow I receive a "Node not deployed" message. May be something very basic on my first attempt to deploy a created/custom node that I am missing. Does anything stand out below as an error in the code of the JS file? I followed basic steps (creation of HTML and JS files, creation of the package.json file via npm init, and npm install to deploy the node. The node shows up within the pallet but receive the error provided on invoke.
module.exports = function(RED) {
function LowerCaseNode(config) {
RED.nodes.createNode(this,config);
axios.get("http://10.0.0.10/getxml?location=/Status/SystemUnit/State", {
headers: {Authorization: "Basic XXXXX"}
}).then((response) => {
msg.payload = response.data
}), (error) => {
msg.payload = error
}
}
}